Skip to content

Commit

Permalink
flow/manager: improve doc; minor cleanup
Browse files Browse the repository at this point in the history
Explain meaning of `ts` in flow managers main loop.
  • Loading branch information
victorjulien committed Dec 20, 2024
1 parent 0f37a53 commit acefd1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/flow-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
uint64_t sleep_per_wu = 0;
bool prev_emerg = false;
uint32_t other_last_sec = 0; /**< last sec stamp when defrag etc ran */
SCTime_t ts;

/* don't start our activities until time is setup */
while (!TimeModeIsReady()) {
Expand All @@ -850,8 +849,10 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
while (run) {
bool emerg = ((SC_ATOMIC_GET(flow_flags) & FLOW_EMERGENCY) != 0);

/* Get the time */
ts = TimeGet();
/* Get the time: real time in live mode, or a min() of the
* "active" threads in offline mode. See TmThreadsGetMinimalTimestamp */
SCTime_t ts = TimeGet();

SCLogDebug("ts %" PRIdMAX "", (intmax_t)SCTIME_SECS(ts));
uint64_t ts_ms = SCTIME_MSECS(ts);
const bool emerge_p = (emerg && !prev_emerg);
Expand Down

0 comments on commit acefd1d

Please sign in to comment.