From: Chris Friesen <cfriesen@nortelnetworks.com>
To: root@chaos.analogic.com
Cc: Chuck Lever <cel@citi.umich.edu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: timer question
Date: Thu, 01 Apr 2004 01:10:00 -0500 [thread overview]
Message-ID: <406BB238.2050207@nortelnetworks.com> (raw)
In-Reply-To: Pine.LNX.4.53.0403311628120.12948@chaos
Richard B. Johnson wrote:
> 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?
As Dick Johnson said, x86 has rdtsc. PowerPC has the mftbr, which is
equivalent. MIPS has something similar.
Many architectures have something, but currently it has to be coded for
each.
One thing that might be nice would be a common API to get a high-res
timestamp, something like a 64-bit nano_uptime, which would be good for
uptimes of up to 524 years at nanosecond precision. Or else you could
just use timespec, although its not as nice on actual 64-bit machines.
Chris
next prev parent reply other threads:[~2004-04-01 6:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-31 21:11 timer question Chuck Lever
2004-03-31 21:31 ` Richard B. Johnson
2004-04-01 6:10 ` Chris Friesen [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-03-05 13:57 Emmanuel Chaput
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=406BB238.2050207@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=cel@citi.umich.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox