mirror of
https://github.com/systemd/systemd.git
synced 2026-08-13 17:08:14 +00:00
time-util: make usleep_safe() support USEC_INFINITY
(cherry picked from commit 78385b8e94)
This commit is contained in:
committed by
Luca Boccassi
parent
7898d04c34
commit
b1e6cce085
@@ -1804,6 +1804,9 @@ int usleep_safe(usec_t usec) {
|
||||
if (usec == 0)
|
||||
return 0;
|
||||
|
||||
if (usec == USEC_INFINITY)
|
||||
return RET_NERRNO(pause());
|
||||
|
||||
struct timespec t;
|
||||
timespec_store(&t, usec);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user