diff options
author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2022-11-28 17:48:29 +0530 |
---|---|---|
committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2022-11-28 17:48:29 +0530 |
commit | 2a2030056332a919fbdb85d648d82c0d2937e8fc (patch) | |
tree | c33945b9c4ad4f00cfa1a09c390068d2d88b338e /src/main.rs | |
parent | a8163f083ee945c426014e0bd0025578cf418146 (diff) |
Shorten line length.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 7d31e24..6034e12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use tokio::signal::unix::{signal, SignalKind}; -use tokio::time; +use tokio::{time::interval, time::Duration}; const ADV_INTERVAL: u64 = 3; const SKEW_INTERVAL: u64 = 1; @@ -19,14 +19,14 @@ async fn sighup_handler() { #[tokio::main(flavor = "current_thread")] async fn main() { let advert_handle = tokio::spawn(async move { - let mut advert_interval = time::interval(time::Duration::from_secs(ADV_INTERVAL)); + let mut advert_interval = interval(Duration::from_secs(ADV_INTERVAL)); loop { advert_interval.tick().await; advert_handler().await; } }); let skew_handle = tokio::spawn(async move { - let mut skew_interval = time::interval(time::Duration::from_secs(SKEW_INTERVAL)); + let mut skew_interval = interval(Duration::from_secs(SKEW_INTERVAL)); loop { skew_interval.tick().await; skew_handler().await; |