Re: Microsecond resolution timers

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Thu, 29 Jul 1999 00:32:31 +0200


Magnus Näslund wrote:
> Excuse me if I'm like putting my foot in my mouth, but can't you like jack
> up the HZ to like 1000, update the time every interrupt.
[...]
> Then user could loop gettimeofday() and get a good precision delay.

gettimeofday() already has about microsecond accuracy (better on some
systems, worse on others). A good precision delay is already possible.

What's not possible is a precise delay while letting another task use
the CPU in the meantime...

And figures on this list have confirmed that 1000Hz on x86 costs about
0.8% CPU. You decide if that's significant or not.

-- Jamie

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