mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-01 01:16:39 +08:00
Fixes to support FreeBSD and Darwin.
This commit is contained in:
@@ -69,7 +69,7 @@ CArchSleepUnix::sleep(double timeout)
|
||||
ARCH->testCancelThread();
|
||||
#else
|
||||
/* emulate nanosleep() with select() */
|
||||
double startTime = time();
|
||||
double startTime = ARCH->time();
|
||||
double timeLeft = timeout;
|
||||
while (timeLeft > 0.0) {
|
||||
struct timeval timeout2;
|
||||
@@ -82,7 +82,7 @@ CArchSleepUnix::sleep(double timeout)
|
||||
SELECT_TYPE_ARG234 NULL,
|
||||
SELECT_TYPE_ARG5 &timeout2);
|
||||
ARCH->testCancelThread();
|
||||
timeLeft = timeout - (time() - startTime);
|
||||
timeLeft = timeout - (ARCH->time() - startTime);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user