What good is usleep()/nanosleep() when you have to more or less wait for the scheduler to give you time (even with SCHED_FIFO)
I’m trying a different approach that will give me much better results, the only downside is I have to read() /dev/hpet which is more expensive than syscalling into the kernel at all. Bummer.
Back to the drawing board.
I could use posix timers, but that would be messy, because the engine calibrates CPU speed on startup/mapcycles to step time in the engine, otherwise you’ll get clock aliasing so it needs control over how long something sleeps.