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

@@ -2,21 +2,21 @@
#include "Common.h"
TScopedTimer::TScopedTimer()
: mStartTime(std::chrono::high_resolution_clock::now()) {
: mStartTime(std::chrono::system_clock::now()) {
}
TScopedTimer::TScopedTimer(const std::string& mName)
: mStartTime(std::chrono::high_resolution_clock::now())
: mStartTime(std::chrono::system_clock::now())
, Name(mName) {
}
TScopedTimer::TScopedTimer(std::function<void(size_t)> OnDestroy)
: OnDestroy(OnDestroy)
, mStartTime(std::chrono::high_resolution_clock::now()) {
, mStartTime(std::chrono::system_clock::now()) {
}
TScopedTimer::~TScopedTimer() {
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);
if (OnDestroy) {