usleep by poll()

Chris Torek torek at elf.ee.lbl.gov
Wed Apr 3 05:00:37 AEST 1991


In article <999 at muffin.cme.nist.gov> libes at cme.nist.gov (Don Libes)
[posts real code.  Commendable.  Now for a tangent :-) ]
>[System V's] poll() is defined in terms of milliseconds.

Good grief---first Bill Joy (most likely candidate at least) makes the
mistake of defining `timeval' structures as seconds+microseconds, then
System V compounds it by going the *wrong direction*!

Time values, including delays, should be in nanosecond granularity,
if not finer.  (Nanoseconds has the advantage of fitting easily in 64
bits as divided into `struct timevalue { long tv_sec; long tv_nsec; };'.)
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov



More information about the Comp.unix.wizards mailing list