mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 16:37:35 +00:00
20 lines
571 B
Diff
20 lines
571 B
Diff
--- c-ray-master/src/utils/timer.c 2021-03-13 00:26:36.846000000 +0100
|
|
+++ c-ray-master/src/utils/timer.c 2021-03-13 00:27:29.453478737 +0100
|
|
@@ -48,7 +48,7 @@
|
|
return ((tmr2.tv_sec - timer.tv_sec) * 1000000) + (tmr2.tv_usec - timer.tv_usec);
|
|
}
|
|
|
|
-#ifdef __linux__
|
|
+#if defined(__linux__) || defined(__serenity__)
|
|
#define _BSD_SOURCE
|
|
#include <unistd.h>
|
|
#endif
|
|
@@ -66,7 +66,7 @@
|
|
ts.tv_sec = ms / 1000;
|
|
ts.tv_nsec = (ms % 1000) * 1000000;
|
|
nanosleep(&ts, NULL);
|
|
-#elif __linux__
|
|
+#elif defined(__linux__) || defined(__serenity__)
|
|
usleep(ms * 1000);
|
|
#endif
|
|
}
|