blob: 940a68dba1879545d7494e3514a3b578f1cc1d35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <littleWire_util.h>
/* Delay in miliseconds */
void delay(unsigned int duration)
{
#if defined _WIN32 || defined _WIN64
// use windows sleep api with milliseconds
Sleep(duration);
#else
// use standard unix api with microseconds
usleep(duration*1000);
#endif
}
|