aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 7113bc92..55e6bce7 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -7,12 +7,13 @@ use std::time::Duration;
use anyhow::Context;
use directories::UserDirs;
-use nix::time::{clock_gettime, ClockId};
+use smithay::reexports::rustix::time::{clock_gettime, ClockId};
use smithay::utils::{Logical, Point, Rectangle};
use time::OffsetDateTime;
pub fn get_monotonic_time() -> Duration {
- Duration::from(clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap())
+ let ts = clock_gettime(ClockId::Monotonic);
+ Duration::new(ts.tv_sec as u64, ts.tv_nsec as u32)
}
pub fn center(rect: Rectangle<i32, Logical>) -> Point<i32, Logical> {