+ if (steadystate_enabled) {
+ since_ss = mtime_since(&last_ss, &ts);
+ if (since_ss >= STEADYSTATE_MSEC || STEADYSTATE_MSEC - since_ss < 10) {
+ steadystate_check();
+ timespec_add_msec(&last_ss, since_ss);
+ if (since_ss > STEADYSTATE_MSEC)
+ next_ss = STEADYSTATE_MSEC - (since_ss - STEADYSTATE_MSEC);
+ else
+ next_ss = STEADYSTATE_MSEC;
+ }
+ else
+ next_ss = STEADYSTATE_MSEC - since_ss;
+ }
+
+ msec_to_next_event = min(min(next_log, msec_to_next_event), next_ss);
+ dprint(FD_HELPERTHREAD, "since_ss: %llu, next_ss: %u, next_log: %u, msec_to_next_event: %u\n", (unsigned long long)since_ss, next_ss, next_log, msec_to_next_event);