[Qt-interest] QTimer issue

Atlant Schmidt aschmidt at dekaresearch.com
Wed Jan 19 22:07:09 CET 2011


Michael:

  The usual way this sort of thing is done is to keep
  a "work list" of some sort and use a single timer
  that expires often enough to meet your scheduling
  resolution. Then, each time this timer expires, code
  examines the work list to see which items, if any,
  have "come due".

  The list of items is sorted by due date/time so the code
  that walks the work list can "early out" the moment
  it encounters an item on the list that is still scheduled
  "in the future".

  If the work list is stored in some non-volatile way,
  this approach also handles the case where your program
  is interrupted for some reason and later resumed. An
  approach that depended on the persistence of QTimers
  wouldn't have this benefit.

                       Atlant


-----Original Message-----
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Michael S
Sent: Wednesday, January 19, 2011 15:31
To: qt mailing list
Subject: [Qt-interest] QTimer issue

Good day all,

I am writing a service type application that schedules its own events. I use the QTimer object to program the events and connect the timeout() signal to a slot that executes my logic. Unfortunately QTimer::start takes an int, which limits me to about 24 days, thus preventing me to scheduling a monthly event. I understand that QTimer was probably not intended for this type of usage, but having a long (or uint) argument type for start() would have been helpful. In any case, what would be the easiest solution?

Thanks,
Michael
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.



More information about the Qt-interest-old mailing list