Changeset 3301 for code/trunk/src/orxonox/tools/Timer.h
- Timestamp:
- Jul 18, 2009, 4:03:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/tools/Timer.h
r3300 r3301 103 103 /** @brief Gives the Timer some extra time. @param time The amount of extra time in seconds */ 104 104 inline void addTime(float time) 105 { if (time > 0.0f) this->time_ += (long long)(time * 1000000.0f); }105 { if (time > 0.0f) this->time_ += static_cast<long long>(time * 1000000.0f); } 106 106 /** @brief Decreases the remaining time of the Timer. @param time The amount of time to remove */ 107 107 inline void removeTime(float time) 108 { if (time > 0.0f) this->time_ -= (long long)(time * 1000000.0f); }108 { if (time > 0.0f) this->time_ -= static_cast<long long>(time * 1000000.0f); } 109 109 /** @brief Sets the interval of the Timer. @param interval The interval */ 110 110 inline void setInterval(float interval) 111 { this->interval_ = (long long)(interval * 1000000.0f); }111 { this->interval_ = static_cast<long long>(interval * 1000000.0f); } 112 112 /** @brief Sets bLoop to a given value. @param bLoop True = loop */ 113 113 inline void setLoop(bool bLoop)
Note: See TracChangeset
for help on using the changeset viewer.