Suspends execution of the calling thread for a specified interval.
#include <unistd.h> int delay ( unsigned int milliseconds);
(IN) Specifies the number of milliseconds the calling thread is to be delayed.
If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:
The delay function puts the calling thread to sleep for the number of milliseconds specified by the milliseconds parameter, rounded up to the next system clock tick.
NOTE:In practical application, the thread is delayed until it regains control of the processor, which might be considerably longer than the specified number of milliseconds.
To revoke delay, call cancel.