feat(bootloader-interface): measure time in firmware as well

This commit is contained in:
2025-10-30 02:51:52 -04:00
parent 87d608366f
commit a77be3c282
4 changed files with 19 additions and 8 deletions

View File

@@ -73,8 +73,13 @@ impl PlatformTimer {
}
}
/// Measure the elapsed duration since the hardware started ticking upwards.
pub fn elapsed_since_lifetime(&self) -> Duration {
self.frequency.duration(arch_ticks())
}
/// Measure the elapsed duration since the timer was started.
pub fn elapsed(&self) -> Duration {
pub fn elapsed_since_start(&self) -> Duration {
let duration = arch_ticks() - self.start;
self.frequency.duration(duration)
}