Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: usleep by poll() Message-ID: <11691@dog.ee.lbl.gov> Date: 2 Apr 91 19:00:37 GMT References: <2171@estevax.UUCP> <126500@uunet.UU.NET> <6925@auspex.auspex.com> <999@muffin.cme.nist.gov> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 14 X-Local-Date: Tue, 2 Apr 91 11:00:37 PST In article <999@muffin.cme.nist.gov> libes@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@ee.lbl.gov