WIP: try removing interrupts within min interarrival
This commit is contained in:
parent
2ca6fdf538
commit
8f0e54053b
@ -46,7 +46,9 @@ pub fn input_bytes_to_interrupt_times(buf: &[u8], config: (usize,u32)) -> Vec<u3
|
|||||||
if ret[i]==0 {continue;}
|
if ret[i]==0 {continue;}
|
||||||
for j in i+1..ret.len()-1 {
|
for j in i+1..ret.len()-1 {
|
||||||
if ret[j]-ret[i] < config.1 as u32 * QEMU_ISNS_PER_USEC {
|
if ret[j]-ret[i] < config.1 as u32 * QEMU_ISNS_PER_USEC {
|
||||||
ret[j] = u32::saturating_add(ret[i],config.1 * QEMU_ISNS_PER_USEC);
|
// ret[j] = u32::saturating_add(ret[i],config.1 * QEMU_ISNS_PER_USEC);
|
||||||
|
ret[j] = 0; // remove the interrupt
|
||||||
|
ret.sort_unstable();
|
||||||
} else {break;}
|
} else {break;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user