[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Kernel class for timers
- From: Mark Loumbert <mark@xxxxxxxxxxxxxxx>
- Date: Tue, 25 Apr 2006 16:33:56 +0400
- Subject: Re: [XaraXtreme-dev] Kernel class for timers
I need this too, so please tell me when you finished !
Alex Bligh wrote:
--On 24 April 2006 20:07 +0100 Phil Martin <phil@xxxxxxxx> wrote:
What sort of thing have you got in mind? As you hint, it would be niice
to have a class-based solution rather than fiddling with messages or
non-oo callback functions.
What I had in mind was a timer object class (which one could derive
ones own from if one wanted), derived from MessageHandler
which would call a DoTimer virtual function either one-shot
or repeatedly. This could be overridden, but the default implementation
would broadcast a timer message, containing a pointer to the timer.
So simple users could use the base-class as is (keeping a pointer
to the timer to check whether it's their timer, or simply having
the timer as a member of the user's class), whereas more complex ones
which want to avoid adding to broadcast traffic could simply derive
I would probably use wxTimer as the basis for this (which effectively
calls on idles) as opposed to hanging off the idle system.