How to count how many Timers are running

Mike Matthews - Omnis omnis at lineal.co.uk
Sun Feb 14 09:40:37 UTC 2021


Thank you Udo,

I’ll try this and see what results I get back.  The key component here is to use $timeleft on any instance, no matter what type, and see if it has a property of $timeleft with a value.  And then count them.

I think that is what your 1 liner is doing. :)

Mike



On 13 Feb 2021, at 17:08, Udo Sonnabend | WigaSoft AG <U.Sonnabend at wigasoft.ch<mailto:U.Sonnabend at wigasoft.ch>> 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
  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,pSYY3-lVMkTciDAb4iIW7VHs1VeI7runIwRAxujEamVAZoulCn414dQvusnmS0IlrgYVhM6lNS8ptshtnBaXS7QTlNqgznAXRj1FTeio9Q,,&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 Rudolf Bargholz
  Gesendet: Samstag, 13. Februar 2021 16:45
  An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>>
  Betreff: AW: How to count how many Timers are running
  This might not be that easy. If a timer object exists as an object
  variable, and is started, you could increment a variable in the
  $starttimer. The problem here is that when the object is destructed the
  object class will likely not get a $stoptimer to decrement the counter.
  This might be alleviated by storing a reference to the object instance
  in a list, and then cleaning up the counter list from no longer
  existing object references. But this would be performance relevant,
  depending on the number of timers that you are trying to log.
  Regards
  Rudolf Bargholz
  -----Ursprüngliche Nachricht-----
  Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com<mailto:omnisdev-en-bounces at lists.omnis-dev.com>> Im Auftrag
  von Udo Sonnabend | WigaSoft AG
  Gesendet: Samstag, 13. Februar 2021 16:11
  An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>>
  Betreff: AW: How to count how many Timers are running
  Hi, may be you could use a class variable and count it up and down or
  use $insts.$count Regards, u.
  WigaSoft AG
  Udo Sonnabend
  Entwickler
  Oberstrasse 222 | Postfach 51 | CH-9014 St. Gallen Telefon +41 71 274
  51 31 | [4]https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.wigasoft.ch&c=E,1,bymXZkjqQWSkz-ZaSBGy6Qw_MbanWwK14REjqqnhhhpQ9X92TKOraP8gZykZ_7nSHXz7gGBq9pF-gkj0pO6dzWxg5IbZbely7cW_EfPoK3tQW_yRRkmyVIy7QPs,&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.wigasoft.ch%2f&c=E,1,fMk6dj508tzorxaizl_CFzp8xNyq2_HkpComKzfHCO58BcG1RJy2rawAqVjd-L3W_4TKTZ7Upt8c0eMYLAkJoU1rcJoa0HHYJRAsE2-lhSTAGtgirA,,&typo=1> |
  U.Sonnabend at wigasoft.ch<mailto: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!
  ________________________________
  Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com<mailto:omnisdev-en-bounces at lists.omnis-dev.com>> im Auftrag
  von Mike Matthews - Omnis <omnis at lineal.co.uk<mailto:omnis at lineal.co.uk>>
  Gesendet: Samstag, 13. Februar 2021 16:03
  An: Bruno Del Sol <bruno.delsol at bydesign.fr<mailto:bruno.delsol at bydesign.fr>>
  Cc: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com<mailto:omnisdev-en at lists.omnis-dev.com>>
  Betreff: Re: How to count how many Timers are running
  Indeed, indeed.  So how do you even count 1 Mr Bruno? :)
  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:omnis at lineal.co.uk><mailto:mike.matthews at lineal.co.uk>
  [5]https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.lineal.co.uk&c=E,1,6yVTPGOFrt1yk2LgLVqMmleNjSno4k0xLNAEZnOawbHM_EsAVCzKqc4GhpubLOIm9AHMTjiJd818Y2xxEvHZVES-KtGBJXf_wS0HW8bs-iMx&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk%2f&c=E,1,ibme5TC5GsQK4S6tLLJ1oytsYO5oNnzZ_lHh6IyR-eMU-KprgOMjossUGH-DgHLUeSYJOvFktO3Ymw_JAtx3d6d5H0ApNCauvPD40WEC7tM,&typo=1>
  [6]https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.sqlworks.co.uk&c=E,1,Mcb-BPRtTzFfC_MaQPdcFC2Ahxf5v8MuxpZLPAqVB59wUjhQuCTZM1G_V4LdSsX0qWJ5mpMfiUmlQhKwOSCAwr1iVT0bbuGp6D63KxN7BPDY&typo=1<https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co%2f&c=E,1,ZFyic0cki9VFShHYnbDBiyDAS_TXG-chLf7mwcudoeFpvWnMsoJ86v6w_eIfB5-aR_RydUFJNCvyFWpo30I02nVz8znEHwyMwHPys0HXkABjKTt7OJgeMzOB&typo=1>
  On 13 Feb 2021, at 15:01, Bruno Del Sol
  <bruno.delsol at bydesign.fr<mailto:bruno.delsol at bydesign.fr><mailto:bruno.delsol at bydesign.fr>> wrote:
  Hi Mike,
  If you have to count'em it means you already have too much, don't you ?
  Sorry, i'm out
  Regards
  Bruno
  By Design
  [7]https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.bydesign.fr&c
  =E,1,k1hwSgoWVIzQPMExgwufkx5iUDOgPgLsM07_H_QN-OqCNg4hzmhQHjnvETpweQzOXi
  2CSAsQhs2SYrDN377y4_8hn_NVCCDRiUF_3t4OpJgg&typo=1
  Bruno Del Sol
  bruno.delsol at bydesign.fr<mailto:bruno.delsol at bydesign.fr>
  46, rue de La Tour d'Auvergne
  75009 Paris (France)
  Le 13/02/2021 à 15:54, Mike Matthews - Omnis a écrit :
  How do you get a list of all timers that are currently running please?
  I'm using Studio v10.2
  Thank you
  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:omnis at lineal.co.uk><mailto:mike.matthews at lineal.co.uk>
  [8]https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.lineal.co.uk
  &c=E,1,EJCGzb3_drgcnJtkpofZgoEr0EEQLSA1FDqIicsLNVETX5WvJUxT_pRUn6kCLHbE
  d2-0w5uRWErjB1_0fKKd3fARvYukExhlbURgeLqek_n-&typo=1<https://linkprotect
  .cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk%2f&c=E,1,_DwDNLsdFjQOs<http://cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk%2f&c=E,1,_DwDNLsdFjQOs>
  YFN3e1Pk518-1OlyuZhMlx1Ym84_u6MNm51s8G4Oa_-n8ay3XUaHPSTYXKw--hLIkjJGB4-
  2RG9F2ymnM77OvKG4rlVKHCkxDtZBXZy7HM,&typo=1>
  [9]https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.sqlworks.co.
  uk&c=E,1,dUGQKW8nFnEfQJM7XWAYvHVyCogOB8CAfdpmEPUUDoV7yuFL4d8ORYOAdJMWo0
  j4DLRTJdUkHUWIqjcZkkhVEwCqPEAjQJ88yZlkeMo3Gc9lysZ9cSA8EV8Ekdg,&typo=1<h
  ttps://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co%2f&c=
  E,1,rbfxc-qhEOuH12w8VPJzTdgmMfc1L02kiCw-MyhmAY3mPXZmUNJXCkqRy4H3GJ4PZ9r
  URdhLrQWEhr7GAWcs_bkg63usg_YyRLbGeW6vfWZ9YsIF4g,,&typo=1>
  _____________________________________________________________
  Manage your list subscriptions at
  [10]https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.
  com&c=E,1,IeVksLcgut7U5SOy6qrFni4uPqCnsJccVsMM70Au_BgPrLJEPYGghGEYcNsLE
  BhpEnLouJfacweyvzEtVyzANaGCewGaXX9VpdnH2llV-zY,&typo=1
  Start a new message -> [11]mailto:omnisdev-en at lists.omnis-dev.com
  _____________________________________________________________
  Manage your list subscriptions at [12]https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com&c=E,1,cGMMsOzBJlQQruVCzH3H4rd-7uOxY2EJA7wOjsLVFy3lz8OTxxvvCT2WBLk32DuTKpGzzGIN5r2OixERWfiwg_iPopMg69EFU0FEhkV8mEOhEoJCILpG&typo=1 Start
  a new message -> [13]mailto:omnisdev-en at lists.omnis-dev.com
  _____________________________________________________________
  Manage your list subscriptions at [14]https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com&c=E,1,EsmjlS2Tz4eSFexIGddDpn7OXYYKOeRw__U3AUdN9b2kY7hAmF2PXz4nB1lEToz7HORDItQIux52CoeJp1YpqQISnYX5PEhjoDGJvgRtmixoXKluIJcAgMyX3YMK&typo=1 Start
  a new message -> [15]mailto:omnisdev-en at lists.omnis-dev.com
  _____________________________________________________________
  Manage your list subscriptions at [16]https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com&c=E,1,9KJRp8aUQfqdfOVY7gQAqjVxt1QwkPTTddEgKMJdd70w_SDyBBHarqajQjKGBVryfN8Vtlv_BfYrlGOVaV8ncIgL-UViemuyP86HNqXcdVNXSbZegURs2TA,&typo=1 Start
  a new message -> [17]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,xaPLRn1Iv7QWXvTKmKlqTMwNqpD0rRfhJm9msXCBy65r5Fz0B9yJJpxnarqQrJgX_38tse8aXeExOVeQlua6-TMau5SsE1bEPDL0XVcj2p6pYQW-PIkLxQ,,&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%2fwww.wigasoft.ch&c=E,1,p5LB7c-KMOs1RnS8xtibpVSpgBNNiNaMLycuZBnWfDIigvOYbHXDWZNFjvQb3KegqvNaayKBCQ4GHu9cAZmkKC8N2RhQb7z6KqX7DWSh-ARHL9GpgtOcxeHn&typo=1<http://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.wigasoft.ch&c=E,1,p5LB7c-KMOs1RnS8xtibpVSpgBNNiNaMLycuZBnWfDIigvOYbHXDWZNFjvQb3KegqvNaayKBCQ4GHu9cAZmkKC8N2RhQb7z6KqX7DWSh-ARHL9GpgtOcxeHn&typo=1><https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.wigasoft.ch%2f&c=E,1,NvAZU3XVXiWKoN9w21ijLr2lIpE1c5gQRopW4nWogieDXjJC69BfpCsYQqSa0qn5TGmyZX7ccd4M4px7IgVhqrJxuAFEk_l_5NdDdyJBYB-5&typo=1
  5. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk&c=E,1,qq-2u3x9N0hR-fl8_TxBEwy4rsTiifht1C0vD0EueU3UIlqPbxmiI4yskJR-k4lGZkHQUpx5BneoXBWhPNGufVQ7RVTMcyCcE6kZuziwaiWPGz3o&typo=1<http://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk&c=E,1,qq-2u3x9N0hR-fl8_TxBEwy4rsTiifht1C0vD0EueU3UIlqPbxmiI4yskJR-k4lGZkHQUpx5BneoXBWhPNGufVQ7RVTMcyCcE6kZuziwaiWPGz3o&typo=1><https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.lineal.co.uk%2f&c=E,1,LbsDrVaZKcuip1eSDzdNiR6i7Gft2yFnF2lIc7Icp8V3TODpmeeFhv9LGj7mfkzVFa-BqDwFtjRBx9hJvw44pv4b27FL2uePTbGzH0TOkds6&typo=1
  6. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co.uk&c=E,1,dJlAkf11biT4tXoQD-aLLEEYOba4dXY7oNC18f1k0FLgkp3F1dRcg_km4Q5Z7j3ye5kxlKr4U4_3MgTzk72uxLsRtK0kmFaGls98tXCwaLLRupZT2JosThN1KQ,,&typo=1<http://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co.uk&c=E,1,dJlAkf11biT4tXoQD-aLLEEYOba4dXY7oNC18f1k0FLgkp3F1dRcg_km4Q5Z7j3ye5kxlKr4U4_3MgTzk72uxLsRtK0kmFaGls98tXCwaLLRupZT2JosThN1KQ,,&typo=1><https://linkprotect.cudasvc.com/url?a=http%3a%2f%2fwww.sqlworks.co%2f&c=E,1,9GP6t34Qh9tm-Em6NlzksfbeRMLEM5AmzNBM3smdKgY1KCLHAFfjgPYN-aatshq88BtI6TWh02RXK4I2kXIYaieaMk6v-p4JhzmLTA0cUO3VM40JwAcKg6wFxWIE&typo=1
  7. https://linkprotect.cudasvc.com/url?a=http://www.bydesign.fr&c=E,1,k1hwSgoWVIzQPMExgwufkx5iUDOgPgLsM07_H_QN-OqCNg4hzmhQHjnvETpweQzOXi2CSAsQhs2SYrDN377y4_8hn_NVCCDRiUF_3t4OpJgg&typo=1
  8. https://linkprotect.cudasvc.com/url?a=https://www.lineal.co.uk&c=E,1,EJCGzb3_drgcnJtkpofZgoEr0EEQLSA1FDqIicsLNVETX5WvJUxT_pRUn6kCLHbEd2-0w5uRWErjB1_0fKKd3fARvYukExhlbURgeLqek_n-&typo=1<http://linkprotect.cudasvc.com/url?a=https://www.lineal.co.uk&c=E,1,EJCGzb3_drgcnJtkpofZgoEr0EEQLSA1FDqIicsLNVETX5WvJUxT_pRUn6kCLHbEd2-0w5uRWErjB1_0fKKd3fARvYukExhlbURgeLqek_n-&typo=1><https://linkprotect.cudasvc.com/url?a=http://www.lineal.co.uk/&c=E,1,_DwDNLsdFjQOsYFN3e1Pk518-1OlyuZhMlx1Ym84_u6MNm51s8G4Oa_-n8ay3XUaHPSTYXKw--hLIkjJGB4-2RG9F2ymnM77OvKG4rlVKHCkxDtZBXZy7HM,&typo=1
  9. https://linkprotect.cudasvc.com/url?a=https://www.sqlworks.co.uk&c=E,1,dUGQKW8nFnEfQJM7XWAYvHVyCogOB8CAfdpmEPUUDoV7yuFL4d8ORYOAdJMWo0j4DLRTJdUkHUWIqjcZkkhVEwCqPEAjQJ88yZlkeMo3Gc9lysZ9cSA8EV8Ekdg,&typo=1<http://linkprotect.cudasvc.com/url?a=https://www.sqlworks.co.uk&c=E,1,dUGQKW8nFnEfQJM7XWAYvHVyCogOB8CAfdpmEPUUDoV7yuFL4d8ORYOAdJMWo0j4DLRTJdUkHUWIqjcZkkhVEwCqPEAjQJ88yZlkeMo3Gc9lysZ9cSA8EV8Ekdg,&typo=1><https://linkprotect.cudasvc.com/url?a=http://www.sqlworks.co/&c=E,1,rbfxc-qhEOuH12w8VPJzTdgmMfc1L02kiCw-MyhmAY3mPXZmUNJXCkqRy4H3GJ4PZ9rURdhLrQWEhr7GAWcs_bkg63usg_YyRLbGeW6vfWZ9YsIF4g,,&typo=1
 10. https://linkprotect.cudasvc.com/url?a=http://lists.omnis-dev.com&c=E,1,IeVksLcgut7U5SOy6qrFni4uPqCnsJccVsMM70Au_BgPrLJEPYGghGEYcNsLEBhpEnLouJfacweyvzEtVyzANaGCewGaXX9VpdnH2llV-zY,&typo=1
 11. mailto:omnisdev-en at lists.omnis-dev.com
 12. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com%2f&c=E,1,1zcigH38Nqb8CmkGI6zCkNloJGLCAG3QLu26Wwhwa-wBhh_lYmVeyyb4sg6zLWb5qQrCmju2HDvV-pZGU7wvPqsvckXDizV-xgL6DRmHwcRyfU3aodtdJhI,&typo=1
 13. mailto:omnisdev-en at lists.omnis-dev.com
 14. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com%2f&c=E,1,f6_pHLDb8kDmYUv6zFzy07SuReqa1aac06kv4iUzNfNVAFv9uzeMBQw5wQHNBpPpHxqv9gdqkSzg0BASJ3JwgDh7lXM1L2In0TLDafwZnO6xQnC8ZFE,&typo=1
 15. mailto:omnisdev-en at lists.omnis-dev.com
 16. https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com%2f&c=E,1,KkStEXXmVFVTlaxx12eKkhmJDRVKYiOt_go3yR2mJWOq9wFv-FTPhYYelaWtadI852ccTLc-flN1NGpW_HAJXWWjlgRab5PVZtog22ICA_E,&typo=1
 17. 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,_1C6yp46aP5tr86Cjo3MR2VgkFGNfc4qTLilzW4lyeu2VsHpfyKNYISOtwe8JfPvrKNKHcS7Wi_Ba11_UORhRXapXr-RbqlJ5Hy5Yr4mqN9iDA,,&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com



More information about the omnisdev-en mailing list