feat: ability to categorize

This commit is contained in:
Mark
2026-03-02 00:28:51 +01:00
parent 19f51c5732
commit dad1ed439b
5 changed files with 178 additions and 120 deletions

View File

@@ -32,7 +32,7 @@ impl Data {
status_updated: Mutex::new((Instant::now(), false)),
}
}
pub fn status_sync(&self, dbg: bool) -> MutexGuard<Status> {
pub fn status_sync(&'_ self, dbg: bool) -> MutexGuard<'_, Status> {
let mut updated = self.status_updated.blocking_lock();
let now = Instant::now();
if (now - updated.0).as_secs_f32() > 3.0 || (dbg && !updated.1) {
@@ -47,7 +47,7 @@ impl Data {
self.status.blocking_lock()
}
}
pub async fn status_async(&self, dbg: bool) -> MutexGuard<Status> {
pub async fn status_async(&'_ self, dbg: bool) -> MutexGuard<'_, Status> {
let mut updated = self.status_updated.lock().await;
let now = Instant::now();
if (now - updated.0).as_secs_f32() > 3.0 || (dbg && !updated.1) {