summaryrefslogtreecommitdiffstats
path: root/commandline/library/littleWire_util.c
blob: 985c4a3fa16ed2b019a966571a7f6cc1e96db655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <littleWire_util.h>

/* Delay in miliseconds */
void delay(unsigned int duration)
{
	#if defined _WIN32 || defined _WIN64
		// use windows sleep api with milliseconds
		// * 2 to make it run at half speed, because windows seems to have some trouble with this...
		Sleep(duration * 2);
	#else
		// use standard unix api with microseconds
		usleep(duration*1000);
	#endif
}