Subject: mono_time exported? (how to make timer work correctly across settimeofday() call?)
To: None <email@example.com>
From: Tad Hunt <firstname.lastname@example.org>
Date: 01/25/2002 12:18:30
I've got the following problem. I have a list of
callbacks set to expire in terms of time(3).
I compute the delta from the smallest expire time
to now, and call select(2) with the appropriate timeout.
However, using time(3) causes problems, because
someone may change the system time while this
process is running. I don't want that change to
mess up my timers.
looking through the kernel, I see that it has a
"mono_time" variable. This is exactly what I'm
looking for, so I can service my callback functions
in terms of mono_time, rather than time(2).
However, unlike "boottime", I don't see any way
to get access to mono_time from userland. I am
considering adding a machdep sysctl(3) to my
kernel to get this, but obviously this isn't
portable. Any other suggestions?