diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-07-14 01:35:25 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-23 21:36:03 +0100 |
commit | d11c3807b32d51e48ed4557972a627f6366956d9 (patch) | |
tree | 3a551793088ff8b7d1475cc1045fbab811b94188 /src/common/Utilities/Timer.h | |
parent | dfc1f08bd84503f6023d033396fc33d356220a62 (diff) |
Core/Time: Rename GetGameTime{System, Steady}Point methods
The names are a bit unhandy. Rename them (shorter but still meaningful).
GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()
Also add 2 new typedefs:
typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;
Closes #25042
(cherry picked from commit 896b68d5c297b06587645caebc98b704978ecaa7)
Diffstat (limited to 'src/common/Utilities/Timer.h')
-rw-r--r-- | src/common/Utilities/Timer.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; |