Test-friendly timer function replacements.