]> git.ipfire.org Git - thirdparty/systemd.git/commit
time-util: use clock_nanosleep() rather than nanosleep()
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Sep 2023 09:18:02 +0000 (11:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Sep 2023 09:22:20 +0000 (11:22 +0200)
commitb401efe5d232be657a1d469f0a7eb3561186e26e
tree8af0c0715c53dad4ab9572c63dbd236c83b07a89
parent01086e76f2f5405280e078630fb85a3560402d48
time-util: use clock_nanosleep() rather than nanosleep()

nanosleep() is kinda broken since it sleeps in the CLOCK_REALTIME clock,
i.e. is subject to time changes.

Let's use clock_nanosleep() instead with CLOCK_MONOTONIC, which is
really the only thing that makes sense.
src/basic/time-util.h