Use a two-stage timer to ensure that a) idle-time events get called at idle-time b) no busy waiting happens and c) idle-time events do not happen more often than g.app.idleTimeDelay msec.
All tests pass and cpu time is zero while Leo is idling (test done on Windows).