feat(gateway): monotonic clock helper (1879)

This commit is contained in:
PedroHMCosme
2026-07-13 18:39:23 -03:00
parent 55f67216ee
commit d6cb1e492d
4 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
from ingestor.connection.clock import MonotonicClock
def test_elapsed_is_non_negative_and_monotonic():
clk = MonotonicClock()
a = clk.elapsed()
b = clk.elapsed()
assert a >= 0 and b >= a # never negative even if wall clock jumps back