remove cycle start

This commit is contained in:
Alex Janka 2023-02-24 13:19:13 +11:00
parent b574e1b1bf
commit db57cf58e1

View file

@ -1,7 +1,6 @@
use self::memory::{Interrupt, Memory};
use crate::verbose_println;
use gilrs::Gilrs;
use std::time::Instant;
mod instructions;
pub mod memory;
@ -28,7 +27,6 @@ pub struct Cpu {
halted: bool,
should_halt_bug: bool,
gamepad_handler: Gilrs,
cycle_start: Instant,
}
impl Cpu {
@ -44,12 +42,10 @@ impl Cpu {
halted: false,
should_halt_bug: false,
gamepad_handler,
cycle_start: Instant::now(),
}
}
pub fn exec_next(&mut self) {
self.cycle_start = Instant::now();
let interrupt_cycles = self.handle_interrupts();
self.increment_timers(interrupt_cycles);