mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-24 02:01:18 +07:00
c65a4f1624
Tracks the presentation time and allows querying the next presentation time.
8 lines
201 B
Rust
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())
|
|
}
|