TAbFlashTimer = class(TAbFlash);
class TAbFlashTimer : public TAbFlash;
TAmFlashTimer is a threaded Timer to supply all our component's with a common
time/pulses. The timer-thread will be created when the first component need the timer
function. The timer will be destroyed when application terminates.
~ 8ms in sum since Start (the timer counts the interval-error and may correct
the next pulse time)
>32ms or one of the Interval-Constants for synchronous time-events.
In general there are two way's to implement our timer in your code:
If the timer event occurs for this control the timer will send a "WM_FLASH" message to the control. This message is send directly to the component (not via windows message queue). To change the interval time you only have to call "AddControl()" again with the new interval. A Control can only use one Frequency at once.
If the timer event occurs for this method the timer will call directly your method. You can add several methods and call them individually.
Interval: interval time in ms or synchronous pulses if a Freq-constants is used
Wpar : no of times the "Timer-Basic-cycle" is called since Timer-Start.
Lpar : if one of the Frequency constants is used for "Interval" then Lpar toggles between 0 and not 0 each time the event occurs otherwise it's "0"
has changed. If you add several components/methods with the same interval-constant then they will be called synchronous.
Hard-& Software A.Baecker
What do you think about this topic? Send feedback!