The previous version did not handle overflow correctly,
which resulted in large excursions in the cycle time.
Here is a plot of IOP cycle time in nanoseconds, without the fix. This is supposed to be 15259 ns for a 65536 Hz IOP. Big glitches are seen every second as the tv_nsec value overflows.