From: "Chris Friesen" <cfriesen@nortel.com>
To: wael showair <showair2003@yahoo.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: is the resolution of do_gettimeofday in usec?
Date: Tue, 02 Jun 2009 14:28:29 -0600 [thread overview]
Message-ID: <4A258B6D.6050006@nortel.com> (raw)
In-Reply-To: <23807779.post@talk.nabble.com>
wael showair wrote:
> Hi All,
> i have board that contains MPC8555 processor with linux 2.6.27 ported to it.
> i want to use an accurate function to measure the time. i searched the
> kernel code & i found several functions but i read that the do_gettimeofday
> is the most accurate one since it has a timer resolution of usec.
You might also look at clock_gettime(), which has a theoretical accuracy
of nanoseconds. Both this and gettimeofday are NTP-corrected if you are
synced to an NTP clock.
> my question is how this function give this accuracy while the kernel timer
> is 4msec?
The accuracy of the timestamp is not related to the tick interval.
Chris
prev parent reply other threads:[~2009-06-02 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-31 22:51 is the resolution of do_gettimeofday in usec? wael showair
2009-06-02 20:28 ` Chris Friesen [this message]
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=4A258B6D.6050006@nortel.com \
--to=cfriesen@nortel.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=showair2003@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.