portable way to do nap()

Erik Murrey erik at mpx1.UUCP
Mon Oct 10 10:29:20 AEST 1988


In article <12665 at ncoast.UUCP>, allbery at ncoast.UUCP (Brandon S. Allbery) writes:
> May I suggest that for both of these, VMIN and VTIME in the tty driver are
> what you should look for?
>
> [example deleted]

This might work reliably at 1200 or 2400 baud, but what happens
above that?  Termio() only allows time values in 1/10 second
increments.  Isn't there a good chance that more than one keystroke
will be received within 1/10th of a second?  At 9600 baud, or 19.2k?
This is why nap() works so well.  It has a HZ resultion, which
is 1/50 of a second on my AT clone, even higher on bigger machines...
-- 
Erik Murrey                            /|   //  /~~~~/  |  /
MPX Data Systems, Inc.                / | / /  /____/   |/
erik at mpx1.UUCP                       /  /  /  /        /|  Data Systems, Inc. 
{spl1,vu-vlsi,bpa}!mpx1!erik        /     /  /       /  |====================



More information about the Comp.unix.wizards mailing list