From: Steven Scholz <steven.scholz@imc-berlin.de>
To: linuxppc-embedded@ozlabs.org
Subject: Re: MPC8xx: resolution of gettimeofday() ?
Date: Mon, 22 May 2006 13:03:50 +0200 [thread overview]
Message-ID: <44719A96.2020309@imc-berlin.de> (raw)
In-Reply-To: <20060519175513.GA12121@gate.ebshome.net>
Eugene,
>>> Usually on PPC we use timebase to interpolate time between Decrementer
>>> interrupts. In this case gettimeofday resolution is determined by
>>> timebase resolution which is quite high (megahertz range).
>> Sorry. I don't understand. What do you mean with "timebase"? Is there a
>> second timer/counter?
>
> PowerPC has a facility called timebase. This is 64-bit counter which
> can be accessed using special instructions (mftb, mftbu on 32-bit PPC).
> Counter resolution depends on particular chip implementation, some
> use core clock, other use bus clock...
>
> It's similar to the time-stamp counter in Intel CPUs (accessed
> with rdtsc instruction).
Thanks very much for clearing this!
> Please, refer to PPC arch manuals for more information. Also, if you
> really interested in how gettimeofday() is implemented, why don't you
> look at the source code yourself?
I tried. But it's not obvious. Not for me anyway.
--
Steven
prev parent reply other threads:[~2006-05-22 11:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 15:10 MPC8xx: resolution of gettimeofday() ? Steven Scholz
2006-05-18 16:48 ` Eugene Surovegin
2006-05-19 8:08 ` Steven Scholz
2006-05-19 17:55 ` Eugene Surovegin
2006-05-22 11:03 ` Steven Scholz [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=44719A96.2020309@imc-berlin.de \
--to=steven.scholz@imc-berlin.de \
--cc=linuxppc-embedded@ozlabs.org \
/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.