1
This commit is contained in:
parent
984d5c3acf
commit
1cb9fc8926
@ -440,7 +440,14 @@ impl Timer {
|
||||
}
|
||||
|
||||
pub fn get_idle_time(&self) -> i64 {
|
||||
let idle_time = 0;
|
||||
let mut idle_time = 0;
|
||||
let start_idx = (self.timer_tick as usize) & TVR_MASK;
|
||||
for i in start_idx..self.tv1.len() {
|
||||
if !self.tv1[i].borrow().empty() {
|
||||
break;
|
||||
}
|
||||
idle_time += 1;
|
||||
}
|
||||
return idle_time;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user