anotherlin/z80emu — pull request #2 by catseye (2012-11-10 12:48:42+00:00)
Title: Display correct CPU speed; store total cycles as double (ANSI C).

Hello again,

The output of `zextest` is:

46734978649 cycle(s) emulated.
For a Z80 running at 4000000MHz, that would be 11683 second(s) or 3.25 hour(s).

But those numbers are actually for a Z80 running at 4 MHz (which is a far more reasonable speed for a Z80, so I guess that is what you meant.)

This change fixes that so it says "running at 4.00MHz".

This change also stores the total number of cycles in a `double` instead of an `int64_t`. The reasons for this are:
* `double` is ANSI C; `int64_t` is not
* doesn't require conditional compilation
* doesn't require special `printf` formatting
* `double` is sufficient for storing 46734978649 (and much larger) with integer precision