aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/local.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/local.rs')
-rw-r--r--src/remake/local.rs6
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()
}