Tweak the scheduler to avoid busy-waiting.

This is the most immediate important change to make to the scheduler, so let's say this resolves #141.  In the future we can make things cleaner and use a more sophisticated scheduling algorithm.

This also adds a `now_sec()` helper that I've been using for instrumentation for a while.