2 messages · Page 1 of 1 (latest)
what about
fn main() {
let start = housekeeping_open();
println!("Hello, world!");
housekeeping_close(start);
}
Best to go with the above solution and avoid the need for global state, however if you do still want global state you can use something like OnceLock to store the Instant in a static