diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-24 15:05:14 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-10-24 15:05:14 +0400 |
| commit | 3fd421f13fb823a5dd2b75d0d8649d190f932b2d (patch) | |
| tree | 3ebf940c92c11153f1f28e3c313d972c7aa1e3f1 /src/utils.rs | |
| parent | d25473188528b9e9b69e2fb70dccaf8c3605128d (diff) | |
| download | niri-3fd421f13fb823a5dd2b75d0d8649d190f932b2d.tar.gz niri-3fd421f13fb823a5dd2b75d0d8649d190f932b2d.tar.bz2 niri-3fd421f13fb823a5dd2b75d0d8649d190f932b2d.zip | |
Update Smithay
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 5 |
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> { |
