Commit 8ee12417 authored by unknown's avatar unknown

Use my_sleep instead of nanosleep for portability

parent 9ccbc5b7
...@@ -16,16 +16,21 @@ ...@@ -16,16 +16,21 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <my_sys.h>
#include <NdbSleep.h> #include <NdbSleep.h>
int int
NdbSleep_MilliSleep(int milliseconds){ NdbSleep_MilliSleep(int milliseconds){
my_sleep(milliseconds*1000);
return 0;
#if 0
int result = 0; int result = 0;
struct timespec sleeptime; struct timespec sleeptime;
sleeptime.tv_sec = milliseconds / 1000; sleeptime.tv_sec = milliseconds / 1000;
sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000; sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
result = nanosleep(&sleeptime, NULL); result = nanosleep(&sleeptime, NULL);
return result; return result;
#endif
} }
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment