Updates the time to prevent crashes