Files
niri/src/utils.rs
T
Ivan Molodetskikh c65a4f1624 Add frame clock
Tracks the presentation time and allows querying the next presentation
time.
2023-08-14 15:53:24 +04:00

8 lines
201 B
Rust

use std::time::Duration;
use smithay::reexports::nix::time::{clock_gettime, ClockId};
pub fn get_monotonic_time() -> Duration {
Duration::from(clock_gettime(ClockId::CLOCK_MONOTONIC).unwrap())
}