You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// --completion-policy was given as a duration: wait even though already idle
224
+
uv_update_time(state.loop);
225
+
O2_SIGNPOST_EVENT_EMIT_INFO(device, lid, "run_loop", "New state pending and already idle, waiting %d seconds before quitting as per --completion-policy.", deviceContext.exitTransitionTimeout);
int matched = sscanf(completionPolicyStr.c_str(), "%d%c", &value, &unit);
3200
+
if (matched >= 1 && value > 0) {
3201
+
int seconds = value;
3202
+
if (matched == 2 && unit == 'm') {
3203
+
seconds = value * 60;
3204
+
} elseif (matched == 2 && unit != 's') {
3205
+
throwstd::runtime_error(fmt::format("Invalid --completion-policy value '{}': use 'quit', 'wait', or a duration like '10s' or '2m'", completionPolicyStr));
throwstd::runtime_error(fmt::format("Invalid --completion-policy value '{}': use 'quit', 'wait', or a duration like '10s' or '2m'", completionPolicyStr));
0 commit comments