Update timer to function