5
votes

I'm trying to measure the execution time of portions of Linux Kernel code and found that there are two different subsystems for timers. hrtimers stands for high resolution timer while hpet means high precision event timer.

How does resolution differs from precision?

http://www.mjmwired.net/kernel/Documentation/timers/

1

1 Answers

5
votes

HPET refers to a specific piece of x86 PC platform hardware (which Linux does have a driver for). HPET is described in eg this wikipedia artitcle: http://en.wikipedia.org/wiki/High_Precision_Event_Timer

hrtimers are a Linux subsystem that give a general framework for the software abstraction of "high resolution timers". hrtimers are the interface that most generic Linux kernel code should use, while HPET is a hardware feature that the low-level, platform-specific time-keeping code uses.