1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 22:27:44 +00:00

Ports: Update the C-ray renderer port

This commit is contained in:
Valtteri Koskivuori 2020-02-25 22:03:47 +02:00 committed by Andreas Kling
parent 712e7102b0
commit 22259bf85d
9 changed files with 85 additions and 87 deletions

View file

@ -0,0 +1,27 @@
diff --git a/src/utils/timer.c b/src/utils/timer.c
index 9978a99..c94d33d 100644
--- a/src/utils/timer.c
+++ b/src/utils/timer.c
@@ -48,20 +48,13 @@ long getUs(struct timeval timer) {
return ((tmr2.tv_sec - timer.tv_sec) * 1000000) + (tmr2.tv_usec - timer.tv_usec);
}
+#include <unistd.h>
+
/**
Sleep for a given amount of milliseconds
@param ms Milliseconds to sleep for
*/
void sleepMSec(int ms) {
-#ifdef WINDOWS
- Sleep(ms);
-#elif __APPLE__
- struct timespec ts;
- ts.tv_sec = ms / 1000;
- ts.tv_nsec = (ms % 1000) * 1000000;
- nanosleep(&ts, NULL);
-#elif __linux__
usleep(ms * 1000);
-#endif
}