mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 00:26:16 +03:00
Honor fake_monotoic_clock setting in clock_nanosleep, addresses #426
This commit is contained in:
@@ -1358,7 +1358,9 @@ int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *req, s
|
||||
}
|
||||
else if (clock_id == CLOCK_MONOTONIC)
|
||||
{
|
||||
timespecadd(&ftpl_starttime.mon, &tdiff, &real_req);
|
||||
if (fake_monotonic_clock) {
|
||||
timespecadd(&ftpl_starttime.mon, &tdiff, &real_req);
|
||||
}
|
||||
}
|
||||
else /* presumably only CLOCK_PROCESS_CPUTIME_ID, leave untouched */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user