Timer Install

From WikiPrizm
Revision as of 17:22, 1 August 2014 by Gbl08ma (talk | contribs) (Created page with "{{syscall | name = Timer_Install | header = fxcg/system.h | index = 0x08D9 | signature = int Timer_Install(int InternalTimerID, void (*handler)(void), int elapse) | synopsis =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Synopsis

Header: fxcg/system.h
Syscall index: 0x08D9
Function signature: int Timer_Install(int InternalTimerID, void (*handler)(void), int elapse)

Installs a timer, optionally at a specific slot, which will run periodically at a given frequency.

Parameters

  • InternalTimerID - slot to install the timer on. If 0, the system will automatically choose a free user timer slot - this is the recommended operation mode. For more information on the slots see Timers.
  • handler - pointer to function that will run periodically. This function must not call any direct-display (DD) syscall, as these are not reentrant.
  • elapse - time, in milliseconds, between each call to handler.

Returns

The number of the slot where the timer is installed. This is the number that should be used as parameter to other timer syscalls.