Subject: Re: settimeofday() versus interval tim{ers,ing}
To: None <>
From: Dennis Ferguson <>
List: tech-kern
Date: 09/29/1996 21:47:55
Shit, did it again.

> I agree. However, I think its already been dealt with -- I vaguely
> recall that the kernel has some notion of a monotonically increasing
> clock somewhere that doesn't get hit by time sets and is of use in
> such applications -- something like mono_time is the name.

Yes, I mentioned it and the things I thought were wrong with it in the
original note.  One of the defects is even pointed out in the code in
kern/subr_disk.c that uses it.

         * XXX We'd like to use something as accurate as microtime(),
         * but that doesn't depend on the system TOD clock.
        if (diskp->dk_busy++ == 0) {
                s = splclock();
                diskp->dk_timestamp = mono_time;

I'd like to use mono_time, only a repaired mono_time without the flaws
(not many things use it that need to, I assume in part because of the
flaws).  I think that's what I'm trying to propose.

Dennis Ferguson