Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

VanLUG Mailing List
Re: Measuring time to nanosecond resolution, how?

New Message Reply About this list Date view Thread view Subject view Author view

Shane Wegner (shane@cm.nu)
Sat, 16 Jan 1999 15:05:17 -0800 (PST)


-----BEGIN PGP SIGNED MESSAGE-----

Hi,

There's the nanosleep(2) function but it can only be accurate within 10ms
on Linux-i386 and 1ms on Linux-alpha. I don't think the current hardware
can be accurate to the nanosecond but if you really need it I'd go with
the alpha and use it's 1ms resolution with realtime scheduling.

- --
Shane Wegner: shane@cm.nu
Tel: (604) 930-0530
Sysadmin, Continuum Systems: http://www.cm.nu
Personal website: http://www.cm.nu/~shane
Celine Dion Fan site: http://www.celine.nu/
PGP key: http://www.cm.nu/~shane/pgp.txt
ICQ UIN: 15706546

On Fri, 15 Jan 1999, Fenton Travers wrote:

> Any one know how to measure as high a resolution of time as possible ie
> greater than 1 millisecond? I know the gettimeofday() call, but on
> Solaris is used something like hrtime() high resolution time, (i don't
> remember the actual name of the function but it was something like that)
> is there an equivalent way to measure elapsed time. Basically I want to
> know when 10 ms +/- 100ns has elapsed very accurately.
>
> Thanks...
> Fenton
>

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv

iQEVAwUBNqEbLlzLgRKaVg+xAQEONAgArLZO4Spj2Zz2Nav9TTzTOjo5kNzy70p6
Qd16plNeD7hgu/7IIAaQ/6IO/s0fsMpDptMTz1bA96l6Ui8JRftb29x2jxUgZqkB
PAdjmwMrBwDD0nJNg3WSMc+0thFVfoCOib2DbrSdgMy3V68AF1RpHzF+RFkrhlP1
ce8B6nuqv08O3aco0AQjipidZcuKDEvV7BVapb33xSChhvDnbm4Qpyx/AFQNlgS0
9odlnwo2adrmCeiNhBaoX+B5C/8VxWFpUU+bWZHGZF8uThgcZK2CQpzd1Q/E+DYe
HS6AfxHDzDRWB1oZFFGoOlbSXKNfCpT3IhxtYbgT81XEVM0nIzibpA==
=EjM0
-----END PGP SIGNATURE-----


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Sat 16 Jan 1999 - 15:06:09 PST