I just used it like I would use a standard TTimer.
Here is a sample usage, in attachment a full project you can load in.
procedure TForm11.FormCreate(Sender: TObject);
begin
Timer1 := TkzTimer.Create(Self);
try
Timer1.OnTimer := DoTimer1;
Timer1.LinkIntervalDueTime := False;
Timer1.DueTime := 5000;
Timer1.Interval := 1;
finally
Timer1.Enabled := True;
end;
Timer2 := TkzTimer.Create(Self);
try
Timer2.OnTimer := DoTimer2;
Timer2.Interval := 750;
finally
Timer2.Enabled := True;
end;
end;
I've tested with Delphi Alexandria, 32 and 64 bit.
When you load project and build it, answer the question about "remove does not have corresponding component" with "No"
As you can see and liked to have, DueTime is added, by default it act like the basic TTimer act with a lag of 1000ms or whatever Interval you set.
In demo i used 1ms with a waiting time of 5s and 750ms, works for me flawless and nothing bad happen on closing the demo.
I added a LinkIntervalDueTime boolean that control if values should be in balance (like a basic TTimer would be) or complete seperated from each other.
Anyway, 1ms is in my demo too fast to process for Vcl, lags are on Vcl side, not my Component.
I hope you like it and find it useful for your needs.
kzTimer.zip