Changeset 2817 for code/branches/gui/src/orxonox/gamestates/GSRoot.h
- Timestamp:
- Mar 21, 2009, 10:17:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSRoot.h
r2805 r2817 38 38 namespace orxonox 39 39 { 40 class _OrxonoxExport GSRoot : public RootGameState , public OrxonoxClass40 class _OrxonoxExport GSRoot : public RootGameState 41 41 { 42 42 friend class ClassIdentifier<GSRoot>; 43 43 44 44 public: 45 struct statisticsTickInfo46 {47 uint64_t tickTime;48 uint32_t tickLength;49 };50 45 51 46 public: … … 59 54 float getTimeFactor() { return this->timeFactor_; } 60 55 61 float getAvgTickTime() { return this->avgTickTime_; }62 float getAvgFPS() { return this->avgFPS_; }63 64 inline void addTickTime(uint32_t length)65 { assert(!this->statisticsTickTimes_.empty()); this->statisticsTickTimes_.back().tickLength += length;66 this->periodTickTime_+=length; }67 68 56 private: 69 57 void enter(); … … 71 59 void ticked(const Clock& time); 72 60 73 void setConfigValues();74 75 61 float timeFactor_; //!< A factor that sets the gamespeed. 1 is normal. 76 62 bool bPaused_; 77 63 float timeFactorPauseBackup_; 78 79 // variables for time statistics80 uint64_t statisticsStartTime_;81 std::list<statisticsTickInfo>82 statisticsTickTimes_;83 uint32_t periodTickTime_;84 float avgFPS_;85 float avgTickTime_;86 87 // config values88 unsigned int statisticsRefreshCycle_;89 unsigned int statisticsAvgLength_;90 64 91 65 // console commands
Note: See TracChangeset
for help on using the changeset viewer.