Well, there's the timing of the emulator program, and then there's the timing of the emulated system. The emulator program needs to be restricted to running only the number of cycles per second that the original CPU would allow. The Gameboy has a timer that programs use to call code at specific intervals. They are 4096, 16384, 65536, and 262144 Hertz. That means they interrupt 4096, 16384, 65536, and 262144 times per second, respectively. As far as I know, the Gameboy has a machine speed of 1.048576 MegaHertz(4.194304 Megahertz clock speed). So, you would take 1048576 / Timer frequency, and that would give you the number of cycles you need to run before calling the interrupt. Hope that's clear
.