aboutsummaryrefslogtreecommitdiff
path: root/src/time.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-06-17 20:10:41 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-06-17 20:10:41 -0300
commitb912ba995c2175b00393f95388ae2ec1afd0494b (patch)
tree20c9eae485c1a365e83db0bcce45f6c691bd4b54 /src/time.cc
parent56bdec57609cd00d7827a3008a9c6b06707097ca (diff)
downloadgame-b912ba995c2175b00393f95388ae2ec1afd0494b.tar.gz
game-b912ba995c2175b00393f95388ae2ec1afd0494b.zip
TPlayer constructor and destructor
Diffstat (limited to 'src/time.cc')
-rw-r--r--src/time.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/time.cc b/src/time.cc
index 0003c39..ad42c47 100644
--- a/src/time.cc
+++ b/src/time.cc
@@ -1,7 +1,5 @@
#include "common.hh"
-#include <time.h>
-
// IMPORTANT(fusion): `RoundNr` is just the number of seconds since startup which
// is why `GetRoundAtTime` and `GetRoundForNextMinute` straight up uses it as
// seconds. It is incremented every 1 second inside `AdvanceGame`.
@@ -12,12 +10,12 @@ uint32 ServerMilliseconds = 0;
// NOTE(fusion): This isn't strictly required because each server process is
// single threaded and don't share static memory, which is what the result of
// the regular `localtime` function uses.
-static struct tm GetLocalTimeTM(time_t timer){
+struct tm GetLocalTimeTM(time_t t){
struct tm result;
#if COMPILER_MSVC
- localtime_s(&result, &timer);
+ localtime_s(&result, &t);
#else
- localtime_r(&timer, &result);
+ localtime_r(&t, &result);
#endif
return result;
}