Expand description
Time source for capture envelopes. Real wall clock by default; can be pinned for deterministic test output via either:
- the
SECUNIT_CAPTURE_FIXED_TIMEenv var (for CLI integration tests that span a child process), or - the in-process
set_fixed_time_for_testshelper (for unit tests that don’t want to fight other parallel tests for the env var).
Structs§
Functions§
- now_
iso8601 - Returns the current UTC instant, formatted as
YYYY-MM-DDTHH:MM:SSZ(no fractional seconds — capture envelopes round to whole seconds so hashes are stable across machines with different clock resolutions). - set_
fixed_ time_ for_ tests - Pin the clock for the duration of the returned guard. The guard holds a process-wide mutex so concurrent time-pinning tests serialize cleanly — without this, rust’s parallel test runner can have one test’s “drop” race against another test’s “read”.