idle Function (ROM Call 0x29B)

system.h

void idle (void);

Switches the calculator to "idle" state for a while.

While idle is running, the calculator rests. idle turns the calculator in "low power" state until the next interrupt occurs (then "low power" state will be disabled, and idle returns).

While calculator is in "idle" state, the power consumption decreases significantly. TIOS very often calls idle, whenever it is in a kind of "idle loop". So it is very useful to be used in programs which waits in a loop for something (waiting for specific keypress, timer expiring, etc.). Many programs should use idle to save the batteries (editors, reflexive games, explorers, debuggers etc.). Thanks to Julien Muchembled for this info.

Note: Thomas Nussbaumer informed me that idle interferes with grayscale graphics, so the use of idle while grayscale mode is active is not recommended.


Used by: cmd_cyclepic, cmd_disptbl, cmd_pause, cmd_sendcalc, cmd_sendchat, EV_eventLoop, EV_getc, GS_PlotAll, GT_Trace, GZ_Stat, Regraph