Re: gettimeofday(), clock_gettime(), timer_gettime()

From: john stultz
Date: Wed Jul 26 2006 - 12:06:45 EST

On 7/25/06, John Richard Moser <nigelenki@xxxxxxxxxxx> wrote:
I'm looking through a few things and noticing some complaints about time
and performance. Briefly, the following things have come to my attention:

- gettimeofday() is slow, or so they say, needing several milliseconds
to execute.

No. At worse its several microseconds (PIT takes about 18us, and its terrible!).
More likely you'll see ~1us using ACPI PM or HPET or ~500-100ns
(depending on your system). With vsyscall it can get into the sub
100ns range.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at