caveman/cave/src/lib.rs

24 lines
499 B
Rust
Raw Normal View History

2022-11-05 20:51:18 +01:00
pub mod init;
pub mod systemd;
pub mod config;
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;
pub mod live_file;
pub mod word_list;
2023-08-08 18:42:34 +02:00
pub mod db;
2023-10-12 23:28:48 +02:00
pub mod posts_cache;
pub mod activitypub;
2023-10-18 02:03:41 +02:00
pub mod block_list;
pub const PERIODS: &[u64] = &[4, 24, 7 * 24];
/// compare the selected period against how many multiples of preceding periods
pub const PERIOD_COMPARE_WINDOW: u64 = 3;
2024-03-27 02:49:15 +01:00
#[must_use] pub fn current_hour() -> u64 {
2024-03-27 02:11:35 +01:00
chrono::offset::Utc::now().timestamp() as u64 / 3600
}