Re: timer question

From: Richard B. Johnson
Date: Wed Mar 31 2004 - 16:44:39 EST

On Wed, 31 Mar 2004, Chuck Lever wrote:

> hi all-
> i'm looking for a way to do microsecond resolution timing in the RPC
> client. i need a timer or timestamp function that is fairly cheap, that i
> can call on any hardware platform, and that i can invoke from inside a
> bottom half.
> any suggestions?
> - Chuck Lever

If you find one, we'd all like to use it! The Intel machines,
after the i486, have the rdtsc instruction which will return
the number of CPU clocks that have occurred since the chip was
turned ON. It can be calibrated upon startup so you know how
many clocks occur in a second.

Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.

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