If you had read my other question, you\'ll know I\'ve spent this weekend putting together a 6502 CPU emulator as a programming exercise.
The CPU emulator is mostly c
I would use the clock cycles to calculate time and them sleep the difference in time. Of course, to do this, you need a high-resolution clock. They way you are doing it is going to spike the CPU in spinning loops.