lkml.org 
[lkml]   [2002]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Measure time
On Wed, 8 May 2002, Der Herr Hofrat wrote:

> > Hello!
> >
> > Is there any function for high precision time measuring.
> > time() returns only in second. I need nanoseconds.
> >
> you can directly read the TSC but that will not realy give you nanoseconds
> resolution as the actual read access even on a PIII/1GHz is going to take
> up to a few 100 nanoseconds, and depending on what you want to time
> stamp the overall jitter of that code can easaly be in the
> range of a microsecond.
>
> There are some hard-realtime patches to the Linux kernel that will
> allow time precission of aprox. 1us (the TSC has a precission of 32ns)
> but I don't think you can get below that without dedicated hardware.
>
> for RTLinux check at ftp://ftp.rtlinux.org/pub/rtlinux/

I recommend RTAI instead. It's more feature-rich, and works with newer
kernels.. the url is http://www.aero.polimi.it/~rtai/, or
http://www.rtai.org.

-Calin

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

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

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