From 3430668bdd67a38d85ca8f56a32866721d4ad773 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sat, 5 Aug 2023 13:11:22 +0100 Subject: [PATCH] change name of cycle measure function and remove from public api --- agb/src/lib.rs | 4 ++-- agb/src/mgba.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 {