Depends what you mean by "daemon code". If you mean multiple event queues then no, but if you mean "handling events for multiple object independently" then yes.
You can implement your own event loop if you want, so a general answer is yes. On Unix Qt uses glib event loop or a classic unix event dispatcher - if you know how to interface them, you have everything ready. If not, you'll have to write some code, I guess...* Would it be easy to modify the event loops used in Qt to operate according to a virtual time provided by the simulator? (I want to run the simulation at much faster than real-time.) Or are these event loops entirely divorced from time (i.e., just queues, not future event queues)?
That I doubt. Qt uses system timer support to achieve its goals. If you modify Qt's source code or place it in a properly prepared operating system then maybe you could control it the way you want.* If I use mechanisms such as QTimers, can they operate on this virtual time rather than actual system time?
No. QTime is probably the one that may cause you trouble.Is this the only Qt class that relies on time?
Depends what the code does. Probably yes.* Would it be easy to then take (essentially) the same code and have it use separate threads for each component when I actually deploy my daemon in the real world?
Bookmarks