Clocks, Timers and Virtualization
The aim of this post is to learn the kinds of clocks and timing mechanism’s available on an x86 system, how they are virtualized by different hypervisors (with a focus on Hyper-V and WSL2) and what is the practical resolution of clocks and timers in both virtualized and bare-metal x86 systems accessible via programming languages like C or Golang. Clocks and Timers A system might have two kinds of clocks available to use in the system, a Wall-Clock Timer and a Monotonic Clock.