Sleep under one second

If I want a script to sleep for less than a second, would I use a decimal? In other words, if I wanted my script to sleep for 1/4 of a second, would I say, SLEEP .25 ??

I don't think you can use the sleep command for less than 1 second, from the man pages:

The sleep command suspends execution of a process for at least the interval specified by the Seconds parameter. The amount of time specified in the Seconds parameter can range from 1 to MAXINT (2,147,483,647) seconds.

See this post for one solution.

GNU sleep 2.0a and up support floating-point numbers (i.e. sleep 0.25).

If your script is in Perl, you can use select() to time out in fractions of seconds:

select(undef,undef,undef,0.25); # sleep 1/4 second

u can use the command "usleep".

u will have to specify the number in microseconds.

for e.g., if u have to sleep for 0.25 seconds.

then specify,

usleep 250000

aaditya

There is a command

delay_output which pauses the production of output for a specified number of milli seconds.

Is this what u want????

-Nisha