delay
Suspends execution for an interval (milliseconds)
#include <nwthread.h>
void delay (
unsigned milliseconds);
This function returns no value. If an error occurs, errno is set to:
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.
A thread blocked on delay can be restarted (that is, delay can be cancelled) by calling ResumeThread.
#include <nwthread.h>
#include <stdio.h>
#include <nwconio.h>
main()
{
printf("start");
delay(10000);
printf("end");
getch();
}