aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Time/GameTime.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-07-14 01:35:25 +0200
committerPeter Keresztes Schmidt <carbenium@outlook.com>2020-07-17 17:05:55 +0200
commit896b68d5c297b06587645caebc98b704978ecaa7 (patch)
tree14952aaccd9419ce4e67831e12c81b988fc280f5 /src/server/game/Time/GameTime.cpp
parent235cdc2fd5c72e8dd8a91fb53a1b90babef24047 (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
Diffstat (limited to 'src/server/game/Time/GameTime.cpp')
-rw-r--r--src/server/game/Time/GameTime.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Time/GameTime.cpp b/src/server/game/Time/GameTime.cpp
index 1b3603e75b3..7742cabef20 100644
--- a/src/server/game/Time/GameTime.cpp
+++ b/src/server/game/Time/GameTime.cpp
@@ -25,8 +25,8 @@ namespace GameTime
time_t GameTime = time(nullptr);
uint32 GameMSTime = 0;
- std::chrono::system_clock::time_point GameTimeSystemPoint = std::chrono::system_clock::time_point::min();
- std::chrono::steady_clock::time_point GameTimeSteadyPoint = std::chrono::steady_clock::time_point::min();
+ SystemTimePoint GameTimeSystemPoint = SystemTimePoint ::min();
+ TimePoint GameTimeSteadyPoint = TimePoint::min();
time_t GetStartTime()
{
@@ -43,12 +43,12 @@ namespace GameTime
return GameMSTime;
}
- std::chrono::system_clock::time_point GetGameTimeSystemPoint()
+ SystemTimePoint GetSystemTime()
{
return GameTimeSystemPoint;
}
- std::chrono::steady_clock::time_point GetGameTimeSteadyPoint()
+ TimePoint Now()
{
return GameTimeSteadyPoint;
}