Trying to fix strange timer crashes.

This commit is contained in:
lotodore
2009-06-09 23:04:04 +00:00
parent 71e9c35ff2
commit a33d9b7c3b
4 changed files with 51 additions and 66 deletions
+1 -1
View File
@@ -32,13 +32,13 @@ public:
TimerManager(boost::shared_ptr<boost::asio::io_service> ioService);
unsigned RegisterTimer(unsigned timeoutMsec, boost::function<void()> timerHandler, bool autoRestart = false);
bool AddTimer(unsigned timerId, unsigned timeoutMsec, boost::function<void()> timerHandler);
bool UnregisterTimer(unsigned timerId);
protected:
struct TimerData
{
unsigned id;
boost::shared_ptr<boost::asio::deadline_timer> timer;
boost::function<void()> userHandler;
unsigned durationMsec;