mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-11 02:06:26 +00:00
change to system_clock for times converted to time_t
This commit is contained in:
@@ -101,7 +101,7 @@ public:
|
||||
// bytes sent on TCP
|
||||
std::atomic_size_t TcpSent = 0;
|
||||
|
||||
std::chrono::high_resolution_clock::time_point ConnectionTime{};
|
||||
std::chrono::system_clock::time_point ConnectionTime{};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
TScopedTimer(std::function<void(size_t)> OnDestroy);
|
||||
~TScopedTimer();
|
||||
auto GetElapsedTime() const {
|
||||
auto EndTime = std::chrono::high_resolution_clock::now();
|
||||
auto EndTime = std::chrono::system_clock::now();
|
||||
auto Delta = EndTime - mStartTime;
|
||||
size_t TimeDelta = Delta / std::chrono::milliseconds(1);
|
||||
return TimeDelta;
|
||||
@@ -20,6 +20,6 @@ public:
|
||||
std::function<void(size_t /* time_ms */)> OnDestroy { nullptr };
|
||||
|
||||
private:
|
||||
std::chrono::high_resolution_clock::time_point mStartTime;
|
||||
std::chrono::system_clock::time_point mStartTime;
|
||||
std::string Name;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user