diff options
| author | Fuwn <[email protected]> | 2023-04-18 01:47:25 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-18 01:47:25 -0700 |
| commit | cfeb34870d78939133222ba61e6a1a5b82d78364 (patch) | |
| tree | 260c3f2c46283ade8083c93b0cc9e754e8c5fe97 /src/modules/uptime.rs | |
| parent | feat(news): add a new news entry (diff) | |
| download | locus-cfeb34870d78939133222ba61e6a1a5b82d78364.tar.xz locus-cfeb34870d78939133222ba61e6a1a5b82d78364.zip | |
refactor(src): drop once_cell dependency for standard library
Diffstat (limited to 'src/modules/uptime.rs')
| -rw-r--r-- | src/modules/uptime.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/uptime.rs b/src/modules/uptime.rs index 67161c5..365c234 100644 --- a/src/modules/uptime.rs +++ b/src/modules/uptime.rs @@ -16,10 +16,11 @@ // Copyright (C) 2022-2022 Fuwn <[email protected]> // SPDX-License-Identifier: GPL-3.0-only -use once_cell::sync::Lazy; +use std::sync::LazyLock; + use tokio::time::Instant; -static UPTIME: Lazy<Instant> = Lazy::new(Instant::now); +static UPTIME: LazyLock<Instant> = LazyLock::new(Instant::now); pub fn module(router: &mut windmark::Router) { UPTIME.elapsed(); |