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

# TCustomTimer

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomTimer - base class for TTimer

## Declaration

Source position: customtimer.pas line 35

`type TCustomTimer = class(TComponent)`
`protected`
`procedure SetEnabled(); virtual;` |  | Sets the Enabled property to True or False
`procedure SetInterval(); virtual;` |  | Sets the Interval property
`procedure SetOnTimer(); virtual;` |  | Sets the OnTimer property
`procedure DoOnTimer; virtual;` |  | DoOnTimer - calls OnTimer event handler
`procedure UpdateTimer; virtual;` |  | Updates the Timer to refleect the current properties
`procedure KillTimer; virtual;` |  | KillTimer - kills the current timer object
`procedure Loaded; override;`
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomTimer: calls inherited Create, sets up handle and initialises timer interval
`destructor Destroy; override;` |  | Destroy: destructor for TCustomTimer: disables and kills timer then calls inherited Destroy
`property Enabled: Boolean; [rw]` |  | Enabled - if True, timer is ready to start
`property Interval: Cardinal; [rw]` |  | The Interval for which the timer is to run
`property OnTimer: TNotifyEvent; [rw]` |  | OnTimer - event handler for timer interval complete (expired)
`property OnStartTimer: TNotifyEvent; [rw]` |  | OnStartTimer - event handler for starting the timer running
`property OnStopTimer: TNotifyEvent; [rw]` |  | OnStopTimer - event handler for stopping the timer
`end;`

## Inheritance

`TCustomTimer` |  | TCustomTimer - base class for TTimer
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net.