API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
Error Codes IShell ISHELL_SetTimer, ISHELL_CancelTimer
This method allows the caller to set a short-term timer. Upon expiration, the specified callback function, in AEECallback, is called with the user data (also specified in AEECallback).
Notes: The timer will expire at Current Time + . Timer callbacks are made in the application's task state. The system shields the application developer from managing non-task callbacks.

Any normal processing can be done in the callback. This includes drawing to the screen, writing to files, and so forth.

Timers do not repeat. Users must reset the timer if they desire a repeating timer.

Specifying the same callback/data pointers will automatically override a pending timer with the same callback/data pointers.

Upon termination of the currently active applet, the shell scans the timer list. If the terminated applet was deleted as a result of its termination (i.e., its reference count went to 0), and an associated timer was found with the data pointer pointing to the IApplet, the timer is deleted.

Negative timeout values are treated the same as 0 timeout values.
Pointer to the IShell object.
Timer expiration in milliseconds. The expiration occurs at Current Time + dwMSecs. Negative values are treated as 0.
The AEECallback structure allocated by the user.
  •     int ISHELL_SetTimerEx
        IShell * pIShell,
        int32 dwMSecs,
        AEECallback * pcb
  • AEE_SUCCESS: The timer successfully set. AEE_EBADPARM: Invalid parameter. AEE_ENOMEMORY: Not enough memory left on the heap to create the timer.
Side Effect
  • If the callback is not a differentl list, it is cancelled.
Preferably, use this method rather than ISHELL_SetTimer() and ISHELL_CancelTimer(). You cancel the timer by canceling the callback: CALLBACK_Cancel(pcb).