1
0
Fork 0
forked from wry/wry

all: fetch current time only once per iteration

This commit is contained in:
Julian Orth 2024-07-11 17:39:18 +02:00
parent d8d6be1ef3
commit bb9e6ba3b5
21 changed files with 99 additions and 97 deletions

View file

@ -18,7 +18,6 @@ use {
renderer::RenderResult,
state::State,
theme::Color,
time::now_nsec,
tree::OutputNode,
udev::UdevDevice,
utils::{
@ -591,7 +590,7 @@ impl MetalConnector {
});
if let Some(delta) = *DELTA {
let next_present = self.next_flip_nsec.get().saturating_sub(delta);
if now_nsec() < next_present {
if self.state.now_nsec() < next_present {
self.state.ring.timeout(next_present).await.unwrap();
}
}