Skip to content

Commit bc5b97c

Browse files
committed
[SystemZ][z/OS] z/OS does not support nanosleep, use usleep instead
1 parent 6d216fb commit bc5b97c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/unittests/Support/TimerTest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ void SleepMS() {
2727
struct timespec Interval;
2828
Interval.tv_sec = 0;
2929
Interval.tv_nsec = 1000000;
30+
#if defined(__MVS__)
31+
long Microseconds = (Interval.tv_nsec + 999) / 1000;
32+
usleep(Microseconds);
33+
#else
3034
nanosleep(&Interval, nullptr);
3135
#endif
3236
}

0 commit comments

Comments
 (0)