glaredb_rt_native 25.6.3

Native runtime and executors for GlareDB
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use glaredb_core::runtime::time::RuntimeInstant;

/// Instant implementation that wraps std Instant.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct NativeInstant(std::time::Instant);

impl RuntimeInstant for NativeInstant {
    fn now() -> Self {
        NativeInstant(std::time::Instant::now())
    }

    fn duration_since(&self, earlier: Self) -> std::time::Duration {
        self.0.saturating_duration_since(earlier.0)
    }
}