Delay for a fraction of a second in C

Mike Faber mikef at wyn386.UUCP
Tue Nov 8 01:50:00 AEST 1988


If you wanted to be fancy (and don't need type ahead)  you could flush the 
stdin buffer, set term.c_iflag(?) &= ~ICANON, and 
term.c_cc[VTIME] = (# of tenths you wanted tyo wait), and
read from stdin (getchar())..  But only if you didn;t need the type ahead...

IF all else fails, follow plumbers rule #1:

If it dont fit, force it.  If it cbreaks(), it didn't belong there in the 
first place...

Or something like that...


-- 
   _   _                  | My employer and sysop do not think,
  (/  (/  _  _   _   _    | so they cannot share my opinions.
 (/)  /\_(/_(/_/|_)_/ \_/ | Joe C Programmer (mikef at wynalda.uucp)  work
               (|     (|  | Michael Faber    (sleepy at wybbs.uucp)   play



More information about the Comp.lang.c mailing list