controller/emgauwa-controller/src/relay_loop.rs

15 lines
400 B
Rust
Raw Normal View History

2023-11-25 23:54:03 +00:00
use crate::settings::Settings;
2023-11-27 11:49:40 +00:00
use chrono::Local;
use std::time::Duration;
use tokio::time;
2023-11-25 23:54:03 +00:00
#[allow(unused_variables)]
pub async fn run_relay_loop(settings: Settings) {
let default_duration = Duration::from_millis(1000);
loop {
let next_timestamp = Local::now().naive_local().time() + default_duration;
time::sleep(default_duration).await;
log::debug!("Relay loop: {}", next_timestamp)
}
2023-11-27 11:49:40 +00:00
}