I'm about to begin a bare metal project on a Raspberry Pi Zero which emulates an old CPU running at 1MHz interacting with the outside world on GPIO, so the timing is critical.
I'm not sure if it's a good approach to use hardware timer interrupts to control the emulated ticks of the CPU. The idea is that i can do other things in the main loop without worrying about timing. The Raspberry Pi Zero runs at 1GHz. I know interrupts need some switching time between contexts, but still a timer interrupt running at 1Mhz seems like a manageable thing.
Am I thinking right or it's in a completely wrong direction?