sleep

Suspends the calling thread for the specified number of seconds.

Library:LibC
Classification:POSIX
Service:General C Services

Syntax

  #include <unistd.h> 
   
  unsigned int sleep (
     unsigned int   seconds);
  

Parameters

seconds

(IN) Specifies the seconds to suspend the calling thread.

Return Values

When the requested time has elapsed, returns 0. If it returns before the sleep interval has elapse, returns the remaining number of seconds to sleep.

See Also