[Gllug] Imposing a delay in a pipeline
David Damerell
damerell at chiark.greenend.org.uk
Tue Apr 13 16:47:11 UTC 2010
On Tuesday, 13 Apr 2010, - Tethys wrote:
>The data is in the form of lines of ASCII text. At busy times, we're
>talking about thousands of lines per second. The incoming data is
>fairly continuous, but I might be able to tolerate quantizing the data
>for output so we output a bunch of lines once per second, for example.
Perl? slurp in some <> with non-blocking IO, usleep (Time::HiRes) 1
second, print the stuff from n seconds ago, rinse and repeat. If you
like you could make that finer resolution than 1 second easily.
--
David Damerell <damerell at chiark.greenend.org.uk> Oil is for sissies
Today is Wednesday, April.
Tomorrow will be Thursday, April.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list