Preserve millisecond granularity in close_if_idle.