Home » U++ Library support » U++ Callbacks and Timers » how to use timer id? and how to kill a timer
how to use timer id? and how to kill a timer [message #27480] |
Tue, 20 July 2010 10:03 |
|
bonami
Messages: 186 Registered: June 2007 Location: Beijing
|
Experienced Member |
|
|
first question
in Ctrl::SetTimeCallback() there is,
ASSERT(id >= 0 && (size_t)id < (int)sizeof(Ctrl));
in doc, it says,
id. Should be in range 0..80. U++ defines compile-time protocol for distributing these ids. If Ctrl wants to use non-zero time callback id, it should define it using
enum { TIMEID_PERIODIC = baseclass::TIMEID_COUNT,
TIMEID_COUNT };
i'm confused by the doc. what's the enum for? my TopWindow::TIMEID_COUNT is 2. that means i can only use id 1 & 2?
second question
how can i add procedure for creating a timer?
i have a TopWindow and it create a Thread. the thread controls when to create and delete a timer. what should i do in TopWindow? after i Run() it, there is no place to insert code to wait for the Thread's timer creation request. is there a way to send a message to TopWindow?
Thank you.
[Updated on: Thu, 22 July 2010 06:40] Report message to a moderator
|
|
|
|
|
how to use timer id? and how to kill a timer
By: bonami on Tue, 20 July 2010 10:03
|
|
|
Re: how to use timer id?
By: mrjt on Wed, 21 July 2010 10:46
|
|
|
Re: how to use timer id?
By: bonami on Wed, 21 July 2010 11:28
|
|
|
Re: how to use timer id?
By: mrjt on Wed, 21 July 2010 12:54
|
|
|
Re: how to use timer id?
By: bonami on Thu, 22 July 2010 04:09
|
|
|
Re: how to use timer id?
By: mrjt on Thu, 22 July 2010 10:58
|
|
|
Re: how to use timer id?
By: bonami on Thu, 22 July 2010 11:32
|
|
|
Re: how to use timer id?
By: mrjt on Thu, 22 July 2010 12:10
|
|
|
Re: how to use timer id?
By: bonami on Fri, 23 July 2010 04:28
|
|
|
Re: how to use timer id?
By: mrjt on Fri, 23 July 2010 11:32
|
|
|
Re: how to use timer id?
By: bonami on Mon, 26 July 2010 04:16
|
Goto Forum:
Current Time: Tue Apr 23 19:19:57 CEST 2024
Total time taken to generate the page: 0.01854 seconds
|