Changeset 8674 for code/branches/unity_build/src/libraries/tools/Timer.cc
- Timestamp:
- May 30, 2011, 12:01:33 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/unity_build/src/libraries/tools/Timer.cc
r8079 r8674 42 42 #include "core/command/ConsoleCommand.h" 43 43 #include "core/command/CommandExecutor.h" 44 #include "core/command/Executor.h" 44 45 #include "core/command/Functor.h" 45 46 #include "tools/interfaces/TimeFactorListener.h" … … 175 176 { 176 177 return TimeFactorListener::getTimeFactor(); 178 } 179 180 /** 181 @brief Initializes and starts the timer, which will call an executor after some time. 182 @param interval The timer-interval in seconds 183 @param bLoop If true, the executor gets called every @a interval seconds 184 @param executor The executor that will be called 185 @param bKillAfterCall If true, the timer will be deleted after the executor was called 186 */ 187 void Timer::setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall) 188 { 189 this->setInterval(interval); 190 this->bLoop_ = bLoop; 191 this->executor_ = executor; 192 this->bActive_ = true; 193 194 this->time_ = this->interval_; 195 this->bKillAfterCall_ = bKillAfterCall; 196 197 executor->getFunctor()->setSafeMode(true); 177 198 } 178 199
Note: See TracChangeset
for help on using the changeset viewer.