A task-based timer