mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 04:57:00 +01:00
9 lines
244 B
Rust
9 lines
244 B
Rust
use std::time::{Duration, SystemTime};
|
|
|
|
pub fn duration_from_epoch_now() -> Duration {
|
|
#[allow(clippy::expect_used)]
|
|
SystemTime::now()
|
|
.duration_since(SystemTime::UNIX_EPOCH)
|
|
.expect("invalid duration from epoch now")
|
|
}
|