metal: commit 1.5ms before the next page flip
This commit is contained in:
parent
a37ce1acda
commit
87d60d267e
4 changed files with 105 additions and 9 deletions
|
|
@ -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 {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue