bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH Mach] Add a mach host operation which returns elapsed tim


From: Samuel Thibault
Subject: Re: [RFC PATCH Mach] Add a mach host operation which returns elapsed time since bootup
Date: Sun, 22 Dec 2024 02:43:02 +0100

Zhaoming Luo, le sam. 21 déc. 2024 12:34:58 +0800, a ecrit:
> On 12/19/24 6:31 PM, Samuel Thibault wrote:
> > Zhaoming Luo, le jeu. 19 déc. 2024 09:23:57 +0800, a ecrit:
> > > On 12/19/24 4:18 AM, Luca wrote:
> > > To be honest I came across /dev/time several times but I'm still quite
> > > confused about it. I tried to read the documentation and the code of 
> > > storeio
> > > translator (`showtrans /dev/time` gave me /hurd/storeio ...) but I didn't
> > > find something useful. May I have a detail explanation about the "time"
> > > device? (purpose and mechanism). Or any documentation that's worth to 
> > > read?
> > 
> > See mach's device table i386/i386at/conf.c, which leads to timemmap(),
> > which maps mtime from mach_clock.c. It could be useful to extend it too.
> Do you have any idea about the meaning of 'uncorrected' in [0]?

This is probably about adjtimex / host_adjust_time.

> And strictly speaking, `time` can be modified using `host_set_time64`
> [1], maybe we can have a comment better than 'time since bootup'.

Yes, it's not the delay since bootup, but the time as gotten from bootup
(see inittodr), and then possibly updated by host_set_time. So it's
rather the (unadjusted) wallclock time.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]