Trait TimestampProvider
Source pub trait TimestampProvider {
type Instant;
// Required method
fn now(&self) -> Self::Instant;
}
Expand description
Trait for adapters that provide current time information
Enables timing information for timestamping, performance measurement, and scheduling.
Type representing an instant in time for this runtime
Gets the current timestamp according to the runtime’s time source
§Example
use aimdb_core::time::TimestampProvider;
fn log_operation<T: TimestampProvider>(provider: &T) {
let _timestamp = provider.now();
println!("Operation completed");
}