aboutsummaryrefslogtreecommitdiff
path: root/src/frame_clock.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-09-04 15:09:58 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-09-04 15:09:58 +0400
commit682182f3633276cdb27aa7fdc028443ff0aa9e13 (patch)
tree2d59eddd3d0cdda768ae2dca699a05910f7fc955 /src/frame_clock.rs
parent9b4a8fed4f1df129d282cc379e44771278ea13c1 (diff)
downloadniri-682182f3633276cdb27aa7fdc028443ff0aa9e13.tar.gz
niri-682182f3633276cdb27aa7fdc028443ff0aa9e13.tar.bz2
niri-682182f3633276cdb27aa7fdc028443ff0aa9e13.zip
Update Smithay and fix winit presentation time
Diffstat (limited to 'src/frame_clock.rs')
-rw-r--r--src/frame_clock.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frame_clock.rs b/src/frame_clock.rs
index 61ad9572..f7f55890 100644
--- a/src/frame_clock.rs
+++ b/src/frame_clock.rs
@@ -24,8 +24,9 @@ impl FrameClock {
}
}
- pub fn refresh_interval_ns(&self) -> Option<NonZeroU64> {
+ pub fn refresh_interval(&self) -> Option<Duration> {
self.refresh_interval_ns
+ .map(|r| Duration::from_nanos(r.get()))
}
pub fn presented(&mut self, presentation_time: Duration) {