mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
25 lines
457 B
C
25 lines
457 B
C
|
#include <windows.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
unsigned int
|
||
|
sleep(unsigned int seconds) {
|
||
|
unsigned int m = seconds / 1000000;
|
||
|
unsigned int n = seconds % 1000000;
|
||
|
unsigned int i;
|
||
|
for (i=0; i<m; i++)
|
||
|
Sleep(1000000*1000);
|
||
|
Sleep(n*1000);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
int
|
||
|
usleep(unsigned int useconds) {
|
||
|
unsigned int m = useconds / 1000;
|
||
|
unsigned int n = useconds % 1000;
|
||
|
if (m == 0 && n > 0)
|
||
|
m = 1;
|
||
|
Sleep(m);
|
||
|
return 0;
|
||
|
}
|
||
|
|