lkml.org 
[lkml]   [2004]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.023 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site