change to system_clock for times converted to time_t

This commit is contained in:
Lion Kortlepel
2022-11-11 21:40:04 +01:00
parent 48135f4544
commit 0327b41611
4 changed files with 8 additions and 8 deletions

View File

@@ -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:

View File

@@ -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;
};