Created timer function for play, stop, update