brk: first commit

This commit is contained in:
nym21
2025-02-23 01:25:15 +01:00
parent 8c3f519016
commit 19cf34f9d4
266 changed files with 225 additions and 1268 deletions

18
_src/utils/time.rs Normal file
View File

@@ -0,0 +1,18 @@
use std::time::Instant;
use log::info;
use crate::structs::DisplayInstant;
pub fn time<F, T>(text: &str, function: F) -> T
where
F: FnOnce() -> T,
{
let time = Instant::now();
let returned = function();
info!("{text} {}", time.display());
returned
}