ODOC: sleep/usleep

Sorry I was busy for the two days and couldn’t post here. And my rescheduled exams start from 16th Dec till 27th Dec.

sleep/usleep — Sleep for a specified amount of time

Summary :

Sleep will introduce a delay for a specified seconds (Seconds may be an arbitrary floating point number). usleep sleeps some no of micro-seconds (default is 1).

Examples :

$ sleep 6 — Sleep for 6 Seconds.

$ sleep 6s — Sleep for 6 Seconds (Default).

$ sleep 6m — Sleep for 6 Minutes.

$ sleep 6h — Sleep for 6 Hours.

$ sleep 6d — Sleep for 6 Days.

$ sleep 10.5 — sleep for 10.5 Seconds.

$ usleep 200 — Sleep for 200 micro Seconds.

Sleep may NOT give a very accurate result on many machines.
Read : man sleep, usleep

Tech Tags: linux