diff options
Diffstat (limited to 'src/common/Utilities')
| -rw-r--r-- | src/common/Utilities/Duration.h | 4 | ||||
| -rw-r--r-- | src/common/Utilities/Timer.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/common/Utilities/Duration.h b/src/common/Utilities/Duration.h index ca71902bc6f..7eb349e6d85 100644 --- a/src/common/Utilities/Duration.h +++ b/src/common/Utilities/Duration.h @@ -32,6 +32,10 @@ typedef std::chrono::minutes Minutes; /// Hours shorthand typedef. typedef std::chrono::hours Hours; +/// time_point shorthand typedefs +typedef std::chrono::steady_clock::time_point TimePoint; +typedef std::chrono::system_clock::time_point SystemTimePoint; + /// Makes std::chrono_literals globally available. using namespace std::chrono_literals; diff --git a/src/common/Utilities/Timer.h b/src/common/Utilities/Timer.h index 4abd6cc8ca1..a197c5cfbb4 100644 --- a/src/common/Utilities/Timer.h +++ b/src/common/Utilities/Timer.h @@ -19,9 +19,9 @@ #define TRINITY_TIMER_H #include "Define.h" -#include <chrono> +#include "Duration.h" -inline std::chrono::steady_clock::time_point GetApplicationStartTime() +inline TimePoint GetApplicationStartTime() { using namespace std::chrono; @@ -46,7 +46,7 @@ inline uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime) return newMSTime - oldMSTime; } -inline uint32 getMSTimeDiff(uint32 oldMSTime, std::chrono::steady_clock::time_point newTime) +inline uint32 getMSTimeDiff(uint32 oldMSTime, TimePoint newTime) { using namespace std::chrono; |
