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