Pavitar
Pavitar

Reputation: 4384

Time Delay (Linux)/(Windows)

I have written a source code with a time delay.In unix I have used the

#include <unistd.h> header file and usleep function.

What is the equivalent to this on windows?

What library and function should I use if I write the same code on windows.

Upvotes: 1

Views: 4817

Answers (1)

Timbo
Timbo

Reputation: 28080

#include <windows.h>

and

::Sleep( 1000 /* milliseconds */ );

Upvotes: 6

Related Questions