Changeset 2558 for code/branches/presentation/src/orxonox
- Timestamp:
- Dec 31, 2008, 11:44:41 AM (16 years ago)
- Location:
- code/branches/presentation/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/gamestates/GSRoot.cc
r2555 r2558 104 104 105 105 // reset frame counter 106 this->frameCount_ = 0;107 106 this->statisticsStartTime_ = 0; 108 107 this->statisticsTickTimes_.clear(); … … 223 222 224 223 // STATISTICS 224 assert(timeAfterTick - timeBeforeTick >= 0 ); 225 225 statisticsTickInfo tickInfo = {timeAfterTick, timeAfterTick - timeBeforeTick}; 226 226 statisticsTickTimes_.push_back(tickInfo); 227 assert(statisticsTickTimes_.back().tickLength==tickInfo.tickLength); 227 228 228 229 // Ticks GSGraphics or GSDedicated … … 230 231 231 232 // Note: tickInfo.tickLength is modified by GSGraphics or GSDedicated! 232 this->periodTickTime_ += statisticsTickTimes_.back().tickLength;233 this->periodTickTime_ += tickInfo.tickLength; 233 234 if (timeAfterTick > statisticsStartTime_ + statisticsRefreshCycle_) 234 235 { … … 240 241 do 241 242 { 243 assert(this->periodTickTime_ > it->tickLength); 242 244 this->periodTickTime_ -= it->tickLength; 243 245 ++it; … … 254 256 } 255 257 256 ++this->frameCount_;257 258 } 258 259 -
code/branches/presentation/src/orxonox/gamestates/GSRoot.h
r2549 r2558 67 67 68 68 inline void addTickTime(uint32_t length) 69 { assert(!this->statisticsTickTimes_.empty()); this->statisticsTickTimes_.back().tickLength += length; } 69 { assert(!this->statisticsTickTimes_.empty()); this->statisticsTickTimes_.back().tickLength += length; 70 this->periodTickTime_+=length; } 70 71 71 72 private: … … 87 88 88 89 // variables for time statistics 89 uint32_t frameCount_;90 90 uint64_t statisticsStartTime_; 91 91 std::list<statisticsTickInfo>
Note: See TracChangeset
for help on using the changeset viewer.