()
| 397 | pub static GTL: OnceCell<RwLock<GlobalTimeLogger>> = OnceCell::new(); |
| 398 | |
| 399 | pub fn init_gtl() { |
| 400 | GTL.set(RwLock::new(GlobalTimeLogger::new())).unwrap(); |
| 401 | } |
| 402 | |
| 403 | pub fn get_gtl() -> RwLockReadGuard<'static, GlobalTimeLogger> { |
| 404 | GTL.get().expect("GTL should not be None").read().unwrap() |