A mechanism provides accurate time-based counters for scaling operating
frequencies of microprocessors. The mechanism makes use of a time-based
counter circuit configuration in which a fixed frequency clock is derived
from a PLL of the clock generation circuit of the microprocessor and is
used to feed the external and internal timebase logic as well as a
timebase accumulator counter. The timebase accumulator counter
accumulates the tick events from the timebase logic between two core
clocks. The accumulated value is transferred to the core clock domain on
every clock edge of a scalable clock and the accumulator is then reset.
Because the accumulated ticks are transferred to the core clock domain
before the accumulator is reset, no ticks are ever lost using the
circuitry of the illustrative embodiment.