datex_core/utils/
time.rs

1use crate::runtime::global_context::get_global_context;
2
3pub trait TimeTrait: Send + Sync {
4    /// Returns the current time in milliseconds since the Unix epoch.
5    fn now(&self) -> u64;
6}
7pub struct Time;
8impl Time {
9    pub fn now() -> u64 {
10        get_global_context().time.now()
11    }
12}