diff --git a/agb/src/lib.rs b/agb/src/lib.rs index 063090e2..c4e57618 100644 --- a/agb/src/lib.rs +++ b/agb/src/lib.rs @@ -289,9 +289,9 @@ pub mod test_runner { mgba::DebugLevel::Info, ) .unwrap(); - mgba::number_of_cycles_tagged(785); + mgba::test_runner_measure_cycles(); self(gba); - mgba::number_of_cycles_tagged(785); + mgba::test_runner_measure_cycles(); assert!( unsafe { agb_alloc::number_of_blocks() } < 2, diff --git a/agb/src/mgba.rs b/agb/src/mgba.rs index 5104fd7d..348df783 100644 --- a/agb/src/mgba.rs +++ b/agb/src/mgba.rs @@ -28,8 +28,8 @@ fn is_running_in_mgba() -> bool { const NUMBER_OF_CYCLES: MemoryMapped = unsafe { MemoryMapped::new(0x04FF_F800) }; -pub fn number_of_cycles_tagged(tag: u16) { - NUMBER_OF_CYCLES.set(tag); +pub(crate) fn test_runner_measure_cycles() { + NUMBER_OF_CYCLES.set(0); } pub struct Mgba {