summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs6
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;