Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
bonami is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Time callbacks when ticks overlap
Next Topic: Callbacks with 'Disable' feature
Goto Forum:
  


Current Time: Tue Apr 23 19:19:57 CEST 2024

Total time taken to generate the page: 0.01854 seconds