The crazy clock has still been losing time. With a little debugging,
it’s become clear that the list-building is taking too long. So spread
the operation across several seconds. We even have to split the shuffle
operation in half.
Add a unit test. This is intended to be used on *nix to check the
individual clock machinery to insure that they keep good time (that is,
they make the correct ratio of calls to doSleep() vs doTick()).
1. Add a DEBUG stub. It will put a 50 ms pulse on the unused output pin
whenever an IRQ overrun is detected.
2. So that we can get rid of the data segment (which means we can get
rid of the data segment initializer), move the statics to global scope
and initialize them ourselves in main().
Get rid of an uninitialized variable warning (though it was meaningless
- which is always 0 or 1).