all: fetch current time only once per iteration
This commit is contained in:
parent
d8d6be1ef3
commit
bb9e6ba3b5
21 changed files with 99 additions and 97 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue