From 3fd421f13fb823a5dd2b75d0d8649d190f932b2d Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 24 Oct 2023 15:05:14 +0400 Subject: Update Smithay --- src/utils.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/utils.rs') 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) -> Point { -- cgit