2023-11-25 23:54:03 +00:00
|
|
|
use crate::settings::Settings;
|
2023-11-27 11:49:40 +00:00
|
|
|
use chrono::Local;
|
2023-11-27 14:09:14 +00:00
|
|
|
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) {
|
2023-11-27 14:09:14 +00:00
|
|
|
let default_duration = Duration::from_millis(1000);
|
|
|
|
loop {
|
|
|
|
let next_timestamp = Local::now().naive_local().time() + default_duration;
|
|
|
|
time::sleep(default_duration).await;
|
2023-11-29 00:03:04 +00:00
|
|
|
log::debug!("Relay loop: {}", next_timestamp)
|
2023-11-27 14:09:14 +00:00
|
|
|
}
|
2023-11-27 11:49:40 +00:00
|
|
|
}
|