Timed reading in C (?)

Angelique Wahlstedt pepper at dasys1.UUCP
Mon Feb 8 19:41:26 AEST 1988


I'm working on a project in the C language, and want to ask the net
readers out there a question:

What I want my program to do is wait a short while (like, say, 5 seconds
or so) for an user to type in something. If the user doesn't type in
anything after that time period, the program goes ahead and does something
else. But if the user has already started to type, the program waits and
lets him finish typing.

What I'd like to know is how to do this in C. (By the way, I'm on BSD
Unix 4.3.) I want the user's terminal to stay in the canonical mode,
if possible.

Post replies here, or send replies to my accounts listed below.

Pepperfully yours,
   Angeli "Ms. Pepper" Wahlstedt


Internet: wahlsted at handel.colostate.edu (I prefer this the most)
          ms_pepper at cup.portal.com

UUCP: ...!hao!handel!wahlsted -- or --
      ...!hplabs!hpfcla!handel!wahlsted

Compuserve: 70206,321



More information about the Comp.unix.questions mailing list