Timer queue implementation and a system for handling timeout events.