On Tue, Sep 05, 2017 at 12:12:32PM +0800, xxhdx1985126 wrote:
> I need to make a thread sleep for some amount of time which is influenced by 
> "chrony's speeding up the system clock", is there any way?

Linux provides the CLOCK_MONOTONIC_RAW clock, which is not influenced
by the chronyd's adjustments of the CLOCK_REALTIME/CLOCK_MONOTONIC
clock.

Unfortunately, it cannot be used in clock_nanosleep() or in a timer.
You would need to make your own timer using clock_gettime() and a busy
loop or sleep in short intervals with another clock.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.

Reply via email to