1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
    Appellation: time <module>
    Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # Time
pub use self::{datetime::*, epoch::*, timestamp::*, utils::*};

pub(crate) mod datetime;
pub(crate) mod epoch;
pub(crate) mod timestamp;

/// Interface for time-related data-structures
pub trait Temporal {
    type Timestamp;

    fn timestamp(&self) -> Self::Timestamp;
}



pub(crate) mod utils {

    pub fn system_timestamp() -> u128 {
        std::time::SystemTime::now()
            .duration_since(std::time::UNIX_EPOCH)
            .unwrap()
            .as_millis()
    }
}