diff options
| author | tv <tv@krebsco.de> | 2026-11-05 02:58:27 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-05 02:58:27 +0100 |
| commit | c5f67f56f46ea5c0b300a2e0eb00a7368efe4f2a (patch) | |
| tree | e4a9235173e546b008fb222be12862bd0075b96e /src/remake/local.rs | |
| parent | c10f9144b1436d4918855a657715b453a6228a44 (diff) | |
dashboard: add epoch switch indicator
Diffstat (limited to 'src/remake/local.rs')
| -rw-r--r-- | src/remake/local.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/remake/local.rs b/src/remake/local.rs index c80a5a5..e13c6fd 100644 --- a/src/remake/local.rs +++ b/src/remake/local.rs @@ -253,6 +253,12 @@ impl RemakeState { .or_insert_with(Instant::now) } + /// How long ago this node first saw remake `id` committed (`first_seen`), if it did. + #[cfg_attr(not(feature = "dashboard"), allow(dead_code))] + pub(crate) fn seen_for(&self, id: &str) -> Option<std::time::Duration> { + self.lock().first_seen.get(id).map(|at| at.elapsed()) + } + pub(crate) fn status(&self, id: &str) -> Option<LocalStatus> { self.lock().status.get(id).cloned() } |
