[Lazarus] How many timers available on Linux (Raspberry Pi)?

Michael Van Canneyt michael at freepascal.org
Wed Jul 22 11:21:07 CEST 2020



On Wed, 22 Jul 2020, Bo Berglund via lazarus wrote:

> On Wed, 22 Jul 2020 08:09:08 +0300, "Alexey Tor. via lazarus"
> <lazarus at lists.lazarus-ide.org> wrote:
>
>> On gtk2 it calls TGtk2WidgetSet.CreateTimer, which calls gtk_timeout_add()
>> I cannot find in inet, about max number of 'timeouts' in gtk2.
>>
>> Alexey
>
> I am using:
> LCLWidgetType:=nogui
>
> This is a console program, which I guess I should have stated in my
> thread subject...

The NoGUI widgetset does not support timers:

function TNoGUIWidgetSet.CreateTimer(Interval: integer; TimerFunc: TWSTimerProc
   ): THandle;
begin
   Result:=0;
end;

function TNoGUIWidgetSet.DestroyTimer(TimerHandle: THandle): boolean;
begin
   Result:=false;
end;

As I stated many times before: DO NOT use the nogui widgetset.
It is a basically flawed concept.

Create a normal console appliation instead and use the fpTimer unit if you
need a timer.

Michael.

PS. 
Please change the lazarus mailing list address you use to <lazarus at lists.lazarus-ide.org>
It seems you're still using the old lazarus at lists.lazarus.freepascal.org
People doing a reply and don't pay attention will send the reply twice,
since the lazarus at lists.lazarus.freepascal.org is put in CC.



More information about the lazarus mailing list