Changeset 1634 for code/branches/gcc43/src/orxonox/tools/Timer.h
- Timestamp:
- Jun 29, 2008, 7:36:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gcc43/src/orxonox/tools/Timer.h
r1552 r1634 81 81 82 82 /** @brief Starts the Timer: Function-call after 'interval' seconds. */ 83 inlinevoid startTimer()83 void startTimer() 84 84 { this->bActive_ = true; this->time_ = this->interval_; } 85 85 /** @brief Stops the Timer. */ 86 inlinevoid stopTimer()86 void stopTimer() 87 87 { this->bActive_ = false; this->time_ = this->interval_; } 88 88 /** @brief Pauses the Timer - it will continue with the actual state if you unpause it. */ 89 inlinevoid pauseTimer()89 void pauseTimer() 90 90 { this->bActive_ = false; } 91 91 /** @brief Unpauses the Timer - continues with the given state. */ 92 inlinevoid unpauseTimer()92 void unpauseTimer() 93 93 { this->bActive_ = true; } 94 94 /** @brief Returns true if the Timer is active (= not stoped, not paused). @return True = Time is active */ 95 inlinebool isActive() const95 bool isActive() const 96 96 { return this->bActive_; } 97 97 /** @brief Gives the Timer some extra time. @param time The amount of extra time in seconds */ 98 inlinevoid addTime(float time)98 void addTime(float time) 99 99 { this->time_ += time; } 100 100 /** @brief Decreases the remaining time of the Timer. @param time The amount of time to remove */ 101 inlinevoid removeTime(float time)101 void removeTime(float time) 102 102 { this->time_ -= time; } 103 103 /** @brief Sets the interval of the Timer. @param interval The interval */ 104 inlinevoid setInterval(float interval)104 void setInterval(float interval) 105 105 { this->interval_ = interval; } 106 106 /** @brief Sets bLoop to a given value. @param bLoop True = loop */ 107 inlinevoid setLoop(bool bLoop)107 void setLoop(bool bLoop) 108 108 { this->bLoop_ = bLoop; } 109 109
Note: See TracChangeset
for help on using the changeset viewer.