mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-21 16:44:07 +00:00
manpage says usleep is obsolete but i dont care
This commit is contained in:
@@ -46,11 +46,14 @@ long MwTimeGetTick(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MwTimeSleep(int ms) {
|
void MwTimeSleep(int ms) {
|
||||||
|
#if 0
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
|
|
||||||
ts.tv_sec = ms / 1000;
|
ts.tv_sec = ms / 1000;
|
||||||
ts.tv_nsec = (ms % 1000) * 1000 * 1000;
|
ts.tv_nsec = (ms % 1000) * 1000000;
|
||||||
|
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
|
#endif
|
||||||
|
usleep(ms * 100);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user