scsys-core 0.3.1

core primitives and utilities for the scsys ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// [systime] is a utilitarian function that returns the current system time in milliseconds.
#[inline]
pub fn systime() -> core::time::Duration {
    std::time::SystemTime::now()
        .duration_since(std::time::UNIX_EPOCH)
        .unwrap()
}
/// [systime] is a utilitarian function that returns the current system time in milliseconds.
#[inline]
pub fn std_time() -> u128 {
    systime().as_millis()
}