lkml.org 
[lkml]   [2001]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Anyone else interested in a high-precision monotonic counter?
Date
"Christopher Friesen" <cfriesen@nortelnetworks.com> wrote:

> Manfred Bartz wrote:
>
> > Why a new system call?
> Well, you'd be accessing a different kernel variable--"ytime" instead of
> "xtime". This new variable wouldn't be adjusted when the system
> time/date was, it would start at zero and always increase.

> > have you looked at the return-value of times(2)
> > Or roll your own using setitimer(2)
>
> Both of these are precise only to jiffies, which defaults at 10
> milliseconds on x86 and PPC. If you want microsecond timing, the only
> current standard way to do it is to use gettimeofday(), which is
> sensitive to changes in system date and time.

Ok. A monotonic, high resolution timer would be useful.

Maybe one should then push for a full implementation of xtime
including TIME_MONOTONIC and TIME_TAI?

<http://www.cl.cam.ac.uk/~mgk25/c-time/>
<http://cr.yp.to/time.html>

--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.036 / U:20.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site