use std::time::{Duration, SystemTime};
pub type Seconds = u64;
pub fn seconds_elapsed() -> Seconds {
SystemTime::UNIX_EPOCH
.elapsed()
.as_ref()
.map(Duration::as_secs)
.unwrap()
}
pub fn seconds_elapsed_for_next_hour() -> Seconds {
const ONE_HOUR: Seconds = 3600;
let seconds = seconds_elapsed();
seconds - (seconds % ONE_HOUR) + ONE_HOUR
}
pub fn current_hour() -> u8 {
time::OffsetDateTime::now_utc().hour()
}