1
0
Fork 0
forked from wry/wry

metal: commit 1.5ms before the next page flip

This commit is contained in:
Julian Orth 2024-09-10 14:28:06 +02:00
parent a37ce1acda
commit 87d60d267e
4 changed files with 105 additions and 9 deletions

View file

@ -58,6 +58,11 @@ impl Time {
let nsec = self.0.tv_nsec as u64 / 1_000_000;
sec + nsec
}
pub fn elapsed(self) -> Duration {
let now = Self::now_unchecked();
now - self
}
}
impl Eq for Time {}