make sleep_time more testable