How to count how many Timers are running

Mike Matthews - Omnis omnis at lineal.co.uk
Mon Feb 15 15:06:05 UTC 2021


So we should in fact run the check twice, with 10 seconds in-between maybe?

Mike Matthews

Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>

omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>

www.lineal.co.uk<http://www.lineal.co.uk/>

www.sqlworks.co.uk<http://www.sqlworks.co/>



On 15 Feb 2021, at 11:16, Udo Sonnabend | WigaSoft AG <U.Sonnabend at wigasoft.ch<mailto:U.Sonnabend at wigasoft.ch>> wrote:

  Hi Phil
  Your args are correct. I am aware of that. Even, the $sendall command
  uses time to parse all classes and instances. A running (waiting)
  instance could be executed and finished before the $sendall is
  completed.
  May be the $sendall has to be refined at bit, depending on the
  implementation of the timers.
  The $timeleft could be omitted and may be $autorestart included into
  the $sendall instead.
  Impudently, testing whether the $timer method of the instance is
  runnig, could be included in the $sendall. This is probably really time
  consuming and unreadable, but could go using sys(192) - I didnt test
  ;))))
  Regards
  u.

  WigaSoft AG
  Udo Sonnabend
  Entwickler
  Oberstrasse 222 | Postfach 51 | CH-9014 St. Gallen
  Telefon +41 71 274 51 31 | [1]https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.wigasoft.ch&c=E,1,Gb8Ow8OlH8KiCqbn39QsyJDUvU_wsWplRHfK9NhaeC3zLKzzCFRSdwUXcx3A5nWAcJUgQlGMriGGwN89HJGu-LH4APTGDyEN_kiDCEPm6q6vjM4RYzE,&typo=1 |
  [2]U.Sonnabend at wigasoft.ch<mailto:U.Sonnabend at wigasoft.ch>

  Diese Mitteilung kann persönliche, vertrauliche oder rechtlich
  geschützte Informationen enthalten und ist nur für die Verwendung durch
  den beabsichtigten Empfänger bestimmt. Auf Vertraulichkeit oder Rechte
  wird aufgrund von Fehlübertragungen nicht verzichtet. Wenn Sie nicht
  der beabsichtigte Empfänger dieser Mitteilung sind, dürfen Sie diese in
  keiner Form verwenden, verbreiten oder kopieren. Haben Sie diese
  Mitteilung irrtümlich erhalten, dann löschen Sie diese und allfällige
  Kopien und benachrichtigen Sie bitte unverzüglich den Absender – besten
  Dank.
  P Bitte denken Sie an die Umwelt, bevor Sie dieses Mail drucken. Think
  before print!
  -----Ursprüngliche Nachricht-----
  Von: omnisdev-en [[3]mailto:omnisdev-en-bounces at lists.omnis-dev.com] Im
  Auftrag von Phil (OmnisList) via omnisdev-en
  Gesendet: Montag, 15. Februar 2021 11:35
  An: omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>
  Cc: Phil (OmnisList) <phil at pgpotter.co.uk<mailto:phil at pgpotter.co.uk>>
  Betreff: Re: AW: How to count how many Timers are running
  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
  _____________________________________________________________
  Manage your list subscriptions at [4]https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com&c=E,1,KlgJf7W6c6yW7508D3NatqtkDGeZ0k0zzt4jut9TV0vASm6Aiuqdhy2RLCfVLXsIXaS0BSfRHZ0e7qRL-TvgJPCO1ZZYlt6tLZrHOXkoEoisA0A80yh2D-x9hg,,&typo=1 Start a
  new message -> [5]mailto:omnisdev-en at lists.omnis-dev.com

References

  1. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.wigasoft.ch%2f&c=E,1,YwXJ5Bz_Toq4hPJuWKAc2MRgwiuawTgv53DqHOEGI_e631E1S1amhdUoTJBZ157QMbLJKsm3hyVWUK0qwJQWQuu9HsFGTiwWi_5W39m0byvA&typo=1
  2. mailto:U.Sonnabend at wigasoft.ch
  3. mailto:omnisdev-en-bounces at lists.omnis-dev.com
  4. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com%2f&c=E,1,IHeR_S--D1q1iuan5zmaCu7MARfXsUo7tG18sMAsX_y3YRptExE20NrIfzFM8Wbjex867AFOOMVGq7WmwhVnUS2QnalLUAnCqs-tKJEH&typo=1
  5. mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com&c=E,1,eDsVMMrTpp338JB2tEeo2x0EnTyCQLMn-rQ6mwHqExQVC7YL2xXOreEef_05QERzfE8fHK-cFlt_r7rdjyGca8f0CxmXVtj1gBPAJnLjmidJ0WhOoRE3&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com



More information about the omnisdev-en mailing list