refactor timers API functions