diff options
| author | tv <tv@krebsco.de> | 2026-10-26 05:38:41 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-26 05:38:41 +0100 |
| commit | f12a839d6e6bdd29a86ac52d5de836519a41aaf0 (patch) | |
| tree | b34da34a22292793c991b15a95908f6cd78bb70b /src/state | |
| parent | 504435444c65efc59c0f7c6881991296258538a7 (diff) | |
wrap unix timestamps in newtype
Diffstat (limited to 'src/state')
| -rw-r--r-- | src/state/host.rs | 4 | ||||
| -rw-r--r-- | src/state/mod.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/state/host.rs b/src/state/host.rs index fd40bf3..6506274 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -85,8 +85,8 @@ impl Host for AppState { self.timing.dormant_after } - fn electorate(&self, doc: &AutoCommit, now_ms: u64) -> Vec<String> { - crate::swarm::members::electorate(doc, now_ms, self.electorate_window) + fn electorate(&self, doc: &AutoCommit, now: crate::clock::UnixMillis) -> Vec<String> { + crate::swarm::members::electorate(doc, now.as_u64(), self.electorate_window) } fn fetch_change( diff --git a/src/state/mod.rs b/src/state/mod.rs index f93bbef..438ad52 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -385,7 +385,7 @@ impl AppState { // how long the change took to reach them (`swarm::stats`). replica.doc.commit_with( automerge::transaction::CommitOptions::default() - .with_time(state.clock.now_millis() as i64), + .with_time(state.clock.now_millis().as_u64() as i64), ); } // Discard partial ops (e.g. old value deleted, new one not written). |
