mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 08:45:33 +02:00
Use my_sleep instead of nanosleep for portability
This commit is contained in:
parent
9ccbc5b7c7
commit
8ee1241766
1 changed files with 5 additions and 0 deletions
|
|
@ -16,16 +16,21 @@
|
|||
|
||||
|
||||
#include <ndb_global.h>
|
||||
#include <my_sys.h>
|
||||
#include <NdbSleep.h>
|
||||
|
||||
int
|
||||
NdbSleep_MilliSleep(int milliseconds){
|
||||
my_sleep(milliseconds*1000);
|
||||
return 0;
|
||||
#if 0
|
||||
int result = 0;
|
||||
struct timespec sleeptime;
|
||||
sleeptime.tv_sec = milliseconds / 1000;
|
||||
sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
|
||||
result = nanosleep(&sleeptime, NULL);
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue