[Overview][Classes][Index] | Reference for unit 'CustomTimer' (#lcl)

# TCustomTimer.DoOnTimer

DoOnTimer signals the OnTimer event handler.

## Declaration

Source position: customtimer.pas line 44

`protected procedure TCustomTimer.DoOnTimer; virtual;`

## Description

DoOnTimer is a protected virtual procedure used to signal the OnTimer event handler (when assigned). No actions are performed in DoOnTimer when OnTimer has not been assigned (contains Nil).

DoOnTimer is called from the Timer method when Enabled contains True and Interval contains a value greater than 0 (zero).

Assign a procedure to OnTimer to perform the actions required when the Interval for the timer has elapsed.

Set the value in Interval to control the frequency of timer event notifications.

Set Enabled to False to prevent execution of the timer.

## See also

TCustomTimer.OnTimer |  | Event handler signalled when the Interval for the timer has elapsed.
TCustomTimer.Enabled |  | Indicates if the timer is ready to start.
TCustomTimer.Interval |  | The Interval (in milliseconds) for timer notifications.