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

@ -29,7 +29,6 @@ use {
},
logind::{LogindError, Session},
state::State,
time::now_usec,
udev::{Udev, UdevError, UdevMonitor},
utils::{
clonecell::{CloneCell, UnsafeCellCloneSafe},
@ -469,7 +468,7 @@ impl MetalInputDevice {
}
fn pre_pause(&self) {
let time_usec = now_usec();
let time_usec = self.state.now_usec();
for (key, _) in self.pressed_keys.take() {
self.event(InputEvent::Key {
time_usec,