Hi Primoz.
Just a thought about the Timer ID.
I am working on quite big project with other people. They are working on their part of code and I am working on mine. For example, I've created this logging mechanism which logs periodically data on HD.
They use my logger but they have no idea (and they shouldn't) that it is based on TimedTask with Timer ID = 1.
But some other guy someday might introduce new timed task and he can also set it up for Timer with ID = 1. Therefore he will replace my callback with his. My logging will stop working, it will not log some crucial data and I lose my job ;-)
It would be good to have something like this:
var
TimerID: Cardinal;
begin
TimerID := GetNewUniqueTimerID;
FTask.SetTimer(TimerID, 2 * 1000, @TTimedTask.MyTask);
end;
or another overload
function SetTimer(interval_ms: cardinal; const timerMessage: TOmniMessageID; out NewTimerID: Cardinal): IOmniTaskControl; overload;
Just my two cents;)
Regards.