From c52d4b5ae43c202569c8801c312c2b56954ff8a0 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 25 Oct 2026 23:00:56 +0100 Subject: add clock module The Clock module is the system clock that every unix timestamp new goes through. It comes with an offset that only tests can set. --- src/swarm/members.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/swarm/members.rs') diff --git a/src/swarm/members.rs b/src/swarm/members.rs index 895e0cc..9b0de18 100644 --- a/src/swarm/members.rs +++ b/src/swarm/members.rs @@ -21,7 +21,7 @@ use serde_json::{Value as JsonValue, json}; use tracing::{debug, info, warn}; use crate::document::store::{self, StoreError}; -use crate::state::{AppState, unix_millis}; +use crate::state::AppState; const META_ROOT: &str = "_continuum"; @@ -168,7 +168,7 @@ pub(crate) async fn ensure_registered(state: &AppState) { ) }; let wanted = state.alias.clone(); - let now = unix_millis(); + let now = state.clock.now_millis(); if !registered { let mut entry = json!({ "since": now, "alive": now }); -- cgit v1.3.1