Implement timer and pause functionality