fixed inefficency in update_time() sequence