From 9a29a862f8686a6bd9e9773aaafd5894e44ff264 Mon Sep 17 00:00:00 2001 From: drbeefsupreme Date: Wed, 15 Jan 2025 18:21:15 -0500 Subject: [PATCH] timer --- crown/src/drivers/timer.rs | 2 +- crown/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crown/src/drivers/timer.rs b/crown/src/drivers/timer.rs index 5d01a35..c8d4ad8 100644 --- a/crown/src/drivers/timer.rs +++ b/crown/src/drivers/timer.rs @@ -5,7 +5,7 @@ use std::time::Duration; use sword::noun::{D, T}; use tokio::time; -pub fn make_timer_driver(interval_secs: u64) -> IODriverFn { +pub fn timer(interval_secs: u64) -> IODriverFn { make_driver(move |handle| async move { let mut timer_interval = time::interval(Duration::from_secs(interval_secs)); diff --git a/crown/src/lib.rs b/crown/src/lib.rs index fe97830..18de5b3 100644 --- a/crown/src/lib.rs +++ b/crown/src/lib.rs @@ -30,7 +30,7 @@ pub use drivers::http::http as http_driver; pub use drivers::markdown::markdown as markdown_driver; pub use drivers::npc::{npc_client as npc_client_driver, npc_listener as npc_listener_driver}; pub use drivers::one_punch::one_punch_man as one_punch_driver; -pub use drivers::timer::make_timer_driver as timer_driver; +pub use drivers::timer::timer as timer_driver; use std::path::PathBuf;