Commit 378feb60 authored by Simon Wörner's avatar Simon Wörner

fixed time diff

parent 274b86a9
......@@ -64,8 +64,12 @@ impl Measure {
self.last = 0u64;
}
fn time_diff(&self) -> u64 {
precise_time_ns() - self.time
fn time_diff(&mut self) -> u64 {
let current_time = precise_time_ns();
let time_diff = current_time - self.last;
self.last = current_time;
time_diff
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment