2022-11-05 20:51:18 +01:00
|
|
|
pub mod init;
|
|
|
|
pub mod systemd;
|
|
|
|
pub mod config;
|
2022-11-07 22:07:07 +01:00
|
|
|
pub mod feed;
|
|
|
|
pub mod store;
|
2022-11-08 00:43:46 +01:00
|
|
|
pub mod trend_tag;
|
2022-11-16 19:12:25 +01:00
|
|
|
pub mod firehose;
|
2023-01-23 21:04:01 +01:00
|
|
|
pub mod live_file;
|
2023-02-24 19:39:30 +01:00
|
|
|
pub mod word_list;
|
2022-11-09 18:11:02 +01:00
|
|
|
|
|
|
|
pub const PERIODS: &[u64] = &[4, 24, 7 * 24];
|
2022-11-14 03:14:12 +01:00
|
|
|
|
|
|
|
/// compare the selected period against how many multiples of preceding periods
|
|
|
|
pub const PERIOD_COMPARE_WINDOW: u64 = 3;
|
|
|
|
|
|
|
|
pub fn current_hour() -> u64 {
|
|
|
|
chrono::offset::Utc::now().naive_utc().timestamp() as u64 / 3600
|
|
|
|
}
|