sleep for less than a second

sleep for less than a second

Post by Gary Wessl » Thu, 14 Sep 2006 12:30:03


Hi

I was reading the $man sleep to find a way to sleep for fraction of a
second. is there a way to do this, I need to use it in a c++ system
command call.

thanks
 
 
 

sleep for less than a second

Post by bsh » Thu, 14 Sep 2006 13:44:29


If this is not pertaining to the sleep _builtin_ command in shell, a
more appropriate group would be comp.unix.programmer; however,
it's a FAQ:

http://www.yqcomputer.com/

Look under section 4.6, "How do I sleep() in a C program for less
than one second?"

=Brian

 
 
 

sleep for less than a second

Post by balreddy.g » Fri, 15 Sep 2006 02:46:01

You can use usleep(n) to sleep for n micro seconds.

Thanks,
Bal Gattu
 
 
 

sleep for less than a second

Post by Bruce Barn » Fri, 15 Sep 2006 09:55:23

Gary Wessle < XXXX@XXXXX.COM > writes:


man nanoleep(2)

note that what you ask for may not be what you get.


--
Sending unsolicited commercial e-mail to this account incurs a fee of
$500 per message, and acknowledges the legality of this contract.