diff options
author | Alexander Harkness <bearbin@gmail.com> | 2013-07-29 13:13:03 +0200 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2013-07-29 13:13:03 +0200 |
commit | 53e22b11857fed62e2313d6d84d90f88ed412ffb (patch) | |
tree | c61e56725da7dff0154d566722651e2c39c9d6c6 /Tools/BiomeVisualiser/Timer.h | |
parent | WebAdmin: Removed the duplicate memory usage querying (diff) | |
download | cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.gz cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.bz2 cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.lz cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.xz cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.zst cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.zip |
Diffstat (limited to 'Tools/BiomeVisualiser/Timer.h')
-rw-r--r-- | Tools/BiomeVisualiser/Timer.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/Tools/BiomeVisualiser/Timer.h b/Tools/BiomeVisualiser/Timer.h index b18d37cb7..78c4b42c7 100644 --- a/Tools/BiomeVisualiser/Timer.h +++ b/Tools/BiomeVisualiser/Timer.h @@ -1,40 +1,40 @@ -
-// Timer.h
-
-// Declares the cTimer class representing a RAII class that measures time from its creation till its destruction
-
-
-
-
-
-#pragma once
-
-#include "time.h"
-
-
-
-
-
-class cTimer
-{
-public:
- cTimer(const AString & a_Title) :
- m_Title(a_Title),
- m_StartTime(clock())
- {
- }
-
- ~cTimer()
- {
- clock_t NumTicks = clock() - m_StartTime;
- LOG("%s took %d ticks (%.02f sec)", m_Title.c_str(), NumTicks, (double)NumTicks / CLOCKS_PER_SEC);
- }
-
-protected:
- AString m_Title;
- clock_t m_StartTime;
-} ;
-
-
-
-
+ +// Timer.h + +// Declares the cTimer class representing a RAII class that measures time from its creation till its destruction + + + + + +#pragma once + +#include "time.h" + + + + + +class cTimer +{ +public: + cTimer(const AString & a_Title) : + m_Title(a_Title), + m_StartTime(clock()) + { + } + + ~cTimer() + { + clock_t NumTicks = clock() - m_StartTime; + LOG("%s took %d ticks (%.02f sec)", m_Title.c_str(), NumTicks, (double)NumTicks / CLOCKS_PER_SEC); + } + +protected: + AString m_Title; + clock_t m_StartTime; +} ; + + + + |