sinoptik/src/maps.rs

22 lines
408 B
Rust
Raw Normal View History

//! Maps handling.
use rocket::tokio::time::{sleep, Duration};
2022-02-12 17:20:36 +01:00
use crate::MAPS;
/// The interval between map refreshes (in seconds).
const SLEEP_INTERVAL: u64 = 60;
#[derive(Debug, Default)]
pub(crate) struct Maps;
impl Maps {
pub(crate) async fn run() -> ! {
loop {
2022-02-12 17:20:36 +01:00
let _maps = MAPS.lock().await;
sleep(Duration::from_secs(SLEEP_INTERVAL)).await;
}
}
}