What is the best algorithm to implement a simple timer library. The library should allow the following:
Timers are typically best implemented in an operating system kernel, at the assembly/C level, making use of platform-specific features like APIC timers wherever possible.
You might like to look at http://lwn.net/Articles/167897/ for details on the Linux implementation, and dig through the Linux source code to see working implementations.