Messages in this thread | | | Date | Wed, 31 Mar 2004 16:31:29 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: timer question |
| |
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.
Cheers, 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |