# The idle states

Read me file for Idle States

Description

  The idle state is the state of the harbour virtual machine when it waits for the user input from the keyboard or the mouse. The idle state is entered during INKEY() calls currently. All applications that don't use INKEY() function call can signal the idle states with the call of HB_IDLESTATE() function (or hb_idleState() on C level).
  During idle states the virtual machine calls the garbage collector and it can call user defined actions (background tasks). It also releases the CPU time slices for some poor platforms that are not smart enough (Windows NT).
  For defining the background tasks see the HB_IDLEADD() and HB_IDLEDEL() functions.
  For direct call for background actions see HB_IDLESTATE() function.
  For signaling the idle state from C code see the hb_idleState() API function.

See Also

- HB_IDLEADD()
- HB_IDLEDEL()