- Timestamp:
- Aug 22, 2010, 12:27:53 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/tools/Timer.h
r6417 r7200 78 78 public: 79 79 Timer(); 80 ~Timer();81 80 82 Timer(float interval, bool bLoop, Executor*executor, bool bKillAfterCall = false);81 Timer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false); 83 82 84 83 /** … … 89 88 @param executor A executor of the function to call 90 89 */ 91 void setTimer(float interval, bool bLoop, Executor*executor, bool bKillAfterCall = false)90 void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false) 92 91 { 93 this->deleteExecutor();94 95 92 this->setInterval(interval); 96 93 this->bLoop_ = bLoop; … … 103 100 104 101 void run(); 105 void deleteExecutor();106 102 107 103 /** @brief Starts the Timer: Function-call after 'interval' seconds. */ … … 141 137 void init(); 142 138 143 Executor *executor_; //!< The executor of the function that should be called when the time expires139 ExecutorPtr executor_; //!< The executor of the function that should be called when the time expires 144 140 145 long long interval_; //!< The time-interval in micro seconds146 bool bLoop_; //!< If true, the function gets called every 'interval' seconds147 bool bActive_; //!< If true, the Timer ticks and calls the function if the time's up148 bool bKillAfterCall_; //!< If true the timer gets deleted after it called the function141 long long interval_; //!< The time-interval in micro seconds 142 bool bLoop_; //!< If true, the function gets called every 'interval' seconds 143 bool bActive_; //!< If true, the Timer ticks and calls the function if the time's up 144 bool bKillAfterCall_; //!< If true the timer gets deleted after it called the function 149 145 150 long long time_; //!< Internal variable, counting the time till the next function-call146 long long time_; //!< Internal variable, counting the time till the next function-call 151 147 }; 152 148 }
Note: See TracChangeset
for help on using the changeset viewer.