changed the timer to use glfw