From 8c49fdc3f87338a4748c9c9d6ab5b1009d94ce97 Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Fri, 30 Dec 2016 14:53:54 -0500 Subject: [PATCH] Fixes #110 Make cpu_test also print out the emulated cpu speed --- src/cpu_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpu_test.c b/src/cpu_test.c index 33ebe69..2ae0698 100644 --- a/src/cpu_test.c +++ b/src/cpu_test.c @@ -20,9 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. +#include #include #include #include +#include #include #include "cpu.h" @@ -75,7 +77,7 @@ int test(int model, uint16_t start_addr, uint16_t success_addr, char *rom_path) double duration = (double) duration_ns / 1000000000.0; double mhz = (double) cpu.counter * (1.0 / duration) / 1000000.0; - fprintf(stderr, "TEST Success; executed %lu cycles in %.4f at %.4f MHz\n", + fprintf(stderr, "TEST Success; executed %" PRIu64 " cycles in %.4f at %.4f MHz\n", cpu.counter, duration, mhz); return 0;