time-util: make usleep_safe() support USEC_INFINITY

This commit is contained in:
Yu Watanabe
2025-12-15 18:09:21 +09:00
parent b8241d3ca5
commit 78385b8e94
+3
View File
@@ -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);