diff options
Diffstat (limited to 'commandline/library/littleWire_util.c')
-rw-r--r-- | commandline/library/littleWire_util.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/commandline/library/littleWire_util.c b/commandline/library/littleWire_util.c index 985c4a3..c34460c 100644 --- a/commandline/library/littleWire_util.c +++ b/commandline/library/littleWire_util.c @@ -1,14 +1,13 @@ #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 +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 } |