AW: How to count how many Timers are running

Phil (OmnisList) phil at pgpotter.co.uk
Mon Feb 15 10:35:08 UTC 2021


Hi Udo,

Great answer.

I wonder if you need to check timeleft?

At a moment in time, the timeleft may be zero whilst it does some 
processing, to be restarted afterwards... but there is still an instance 
of the object there?

Would the timer be considered to still be running at that point?

I guess it depends whether you want to know what timer is doing nothing, 
just waiting for time to pass, or how many timers you may have running 
at all.


Not sure I've noticed $insts of an object before, guess I never needed 
to know, but good to know now.

regards
Phil Potter
Based in Chester in the UK.

On 13/02/2021 17:08, Udo Sonnabend | WigaSoft AG wrote:
>     Hi Mike
>     May be that helps:
>     It creates a list of all Timers running with a $timeleft>0. May be you
>     have to refine the $sendall a bit.
>     Do #L1.$define(#S1)
>     Do
>     $libs.$sendall($sendallref.$classes.$sendall($sendallref.$insts().$send
>     all(#L1.$add($sendallref.$fullname),$sendallref.$timeleft>0),$sendallre
>     f.$superclass='.Timer Library.Timer'&$sendallref.$insts.$count()))
>     Regards, u.
>
>     WigaSoft AG
>     Udo Sonnabend


More information about the omnisdev-en mailing list