smol bot
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 8a28708..1d620e2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,11 @@ #![feature(lazy_cell, let_chains, iter_intersperse, if_let_guard, const_mut_refs)] + +use std::{sync::OnceLock, time::Instant}; #[macro_use] mod bot; - +static START: OnceLock<Instant> = OnceLock::new(); #[tokio::main(flavor = "current_thread")] async fn main() { + START.get_or_init(|| Instant::now()); bot::Bot::spawn().await; } |