Skip to content

Commit e889602

Browse files
test: trying to fix thread::sleep
1 parent 95b9ab0 commit e889602

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/vibrant/thread.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ inline void original::thread::sleep(const time::duration& d)
907907
if (d.value() < 0)
908908
return;
909909

910-
#if defined(ORIGINAL_PLATFORM_LINUX)
910+
#if ORIGINAL_PLATFORM_LINUX
911911
const timespec ts = d.toTimespec();
912912
int code = clock_nanosleep(CLOCK_REALTIME, 0, &ts, nullptr);
913913

@@ -918,7 +918,7 @@ inline void original::thread::sleep(const time::duration& d)
918918
if (code != 0)
919919
throw sysError("Failed to sleep thread (clock_nanosleep returned " +
920920
formatString(code) + ", errno: " + formatString(errno) + ").");
921-
#elif defined(ORIGINAL_PLATFORM_MACOS)
921+
#elif ORIGINAL_PLATFORM_MACOS
922922
const timespec ts = d.toTimespec();
923923
timespec rem = ts;
924924
int code;
@@ -931,7 +931,7 @@ inline void original::thread::sleep(const time::duration& d)
931931
if (code != 0)
932932
throw sysError("Failed to sleep thread (nanosleep returned " +
933933
formatString(code) + ", errno: " + formatString(errno) + ").");
934-
#elif defined(ORIGINAL_PLATFORM_WINDOWS)
934+
#elif ORIGINAL_PLATFORM_WINDOWS
935935

936936
Sleep(d.toDWMilliseconds());
937937

0 commit comments

Comments
 (0)