[comp.lang.c] Re^2: sleep

rolff@mosh.UUCP (Anders Rolff) (12/20/89)

peter@sersun1.essex.ac.uk (Allott P) writes:

>>But what if you want to sleep for less than one second, say, 0.5?

>It is possible to "sleep" for less than one second by doing a
>selcect(.......) with an appropriate value in the timeval (5th param I think)
>and with no channels to check (2nd through 4th params I think).

In SunOS there's a usleep() that sleeps in milliseconds.

--Anders

dskim@eng.umd.edu (Daeshik Kim) (12/28/89)

In article <107@mosh.UUCP> rolff@mosh.UUCP (Anders Rolff) writes:
>peter@sersun1.essex.ac.uk (Allott P) writes:
>
>>selcect(.......) with an appropriate value in the timeval (5th param I think)

	Why not 'setitimer' ?
--
	Daeshik Kim	H: (301) 445-0475/2147 O: (703) 689-7308 (M,W,F)
	SCHOOL:	dkim@cscwam.umd.edu (uunet!haven!cscwam.umd.edu!dkim)
		dskim@eng.umd.edu (uunet!haven!eng.umd.edu!dskim)
	WORK:	dkim@daffy.uu.net (uunet!daffy!dkim)