Rework timer infrastructure for more robust locking.