Class TCastleTimer

Unit

Declaration

type TCastleTimer = class(TCastleUserInterface)

Description

Timer, running the OnTimer event periodically.

Hierarchy

Overview

Methods

Protected procedure DoTimer; virtual;
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Published property IntervalSeconds: TFloatTime read FIntervalSeconds write SetIntervalSeconds;
Published property OnTimer: TNotifyEvent read FOnTimer write FOnTimer;
Published property CounteractDelays: boolean read FCounteractDelays write FCounteractDelays default false;

Description

Methods

Protected procedure DoTimer; virtual;
 
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
 
Public function PropertySections(const PropertyName: String): TPropertySections; override;
 

Properties

Published property IntervalSeconds: TFloatTime read FIntervalSeconds write SetIntervalSeconds;

How often should we call OnTimer. Value of 0 means to call OnTimer in every Update event.

Published property OnTimer: TNotifyEvent read FOnTimer write FOnTimer;

The event called periodically.

Published property CounteractDelays: boolean read FCounteractDelays write FCounteractDelays default false;

Should we counteract the delays in timer by firing next event sooner. This helps to keep a constant frequency of timer events over a long time, and to keep multiple things (like multiple timer instances) perfectly synchronized with each other. But it may cause to execute a lot of timer events at once, in case the application hung for some time.


Generated by PasDoc 0.16.0.