migrate detect_uptime