mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 00:26:16 +03:00
Sleep() and alarm() still could apply faking several times
This commit is contained in:
@@ -689,7 +689,7 @@ int usleep(useconds_t usec)
|
||||
}
|
||||
|
||||
DONT_FAKE_TIME(result = (*real_usleep)(usec_real));
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -704,7 +704,7 @@ unsigned int sleep(unsigned int seconds)
|
||||
}
|
||||
|
||||
DONT_FAKE_TIME(ret = (*real_sleep)(seconds_real));
|
||||
return (user_rate_set)?(user_rate * ret):ret;
|
||||
return (user_rate_set && !dont_fake)?(user_rate * ret):ret;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -719,7 +719,7 @@ unsigned int alarm(unsigned int seconds)
|
||||
}
|
||||
|
||||
DONT_FAKE_TIME(ret = (*real_alarm)(seconds_real));
|
||||
return (user_rate_set)?(user_rate * ret):ret;
|
||||
return (user_rate_set && !dont_fake)?(user_rate * ret):ret;
|
||||
}
|
||||
|
||||
time_t time(time_t *time_tptr) {
|
||||
|
||||
Reference in New Issue
Block a user