13 #ifndef G3D_Stopwatch_h
14 #define G3D_Stopwatch_h
89 Stopwatch(
const std::string& name =
"Stopwatch");
149 void after(
const std::string& s =
"");
RealTime elapsedTime() const
Definition: Stopwatch.h:108
Stopwatch StopWatch
Definition: Stopwatch.h:154
RealTime lastDuration
Definition: Stopwatch.h:68
double emwaFPS
Definition: Stopwatch.h:75
RealTime timeStart
Definition: Stopwatch.h:63
void computeOverhead()
Definition: Stopwatch.cpp:28
bool m_enabled
Definition: Stopwatch.h:50
std::string prevMark
Definition: Stopwatch.h:53
uint64_t uint64
Definition: g3dmath.h:170
RealTime emwaDuration
Definition: Stopwatch.h:79
double RealTime
Definition: G3DGameUnits.h:27
void tick()
Definition: Stopwatch.cpp:36
double startTime
Definition: Stopwatch.h:52
uint64 elapsedCycles() const
Definition: Stopwatch.h:130
void reset()
Definition: Stopwatch.cpp:100
double m_smoothFPS
Definition: Stopwatch.h:76
double prevTime
Definition: Stopwatch.h:54
double smoothFPS() const
Definition: Stopwatch.h:123
Accurately measure durations and framerates.
Definition: Stopwatch.h:45
void after(const std::string &s="")
Definition: Stopwatch.cpp:106
std::string myName
Definition: Stopwatch.h:48
void tock()
Definition: Stopwatch.cpp:49
bool enabled() const
Definition: Stopwatch.h:96
double m_fps
Definition: Stopwatch.h:72
RealTime lastTockTime
Definition: Stopwatch.h:66
int64_t int64
Definition: g3dmath.h:169
int64 cycleOverhead
Definition: Stopwatch.h:82
void setEnabled(bool e)
Definition: Stopwatch.h:91
bool inBetween
Definition: Stopwatch.h:57
Stopwatch(const std::string &name="Stopwatch")
Definition: Stopwatch.cpp:18
int64 lastCycleCount
Definition: Stopwatch.h:69
double FPS() const
Definition: Stopwatch.h:102
uint64 cycleStart
Definition: Stopwatch.h:60
RealTime smoothElapsedTime() const
Definition: Stopwatch.h:115