[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Higher resolution timers

From: Vesa Jääskeläinen
Subject: Re: Higher resolution timers
Date: Wed, 14 May 2008 19:26:54 +0300
User-agent: Thunderbird (Windows/20080421)

Hi All,

Colin D Bennett wrote:
To implement a nice GUI with some animations, it will be important to
have a timer with a better resolution than 1/18 second (which appears
to be the current GRUB timer resolution on the PC).

What would be the best way to do this? Possibilities that I am aware of
are: * RDTSC instruction (must calibrate with RTC at startup?)
 * HPET (complex to use?)
 * RTC (can we set the timer interrupt rate to >18 Hz?)

Does anyone have any thoughts on these options?

I think that using the TSC (w/ RDTSC instruction) and calibrating it
with a quick 2-3 RTC tick loop at startup might be the easiest option.

Perhaps non-x86 BIOS people could provide feedback how to get more detailed timer information on other platforms? So we could produce an API that would be portable.

At least RDTSC do not work on pre-pentium machines so at least some detection for this OP code would be required to determine best possible way to use timer service. I think we have cpuid module already, perhaps this could be used for that too...

Vesa Jääskeläinen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]