summaryrefslogtreecommitdiffstats
path: root/src/common/timer.h
diff options
context:
space:
mode:
authorzhupengfei <zhupengfei321@sina.cn>2018-07-21 11:09:15 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-07-29 14:58:30 +0200
commit38a11136744b814b12036527f84b71eae0ef6ea6 (patch)
tree48f7ab2578d29f62037bdb752fc92173d475cd18 /src/common/timer.h
parentMerge pull request #847 from lioncash/ncm (diff)
downloadyuzu-38a11136744b814b12036527f84b71eae0ef6ea6.tar
yuzu-38a11136744b814b12036527f84b71eae0ef6ea6.tar.gz
yuzu-38a11136744b814b12036527f84b71eae0ef6ea6.tar.bz2
yuzu-38a11136744b814b12036527f84b71eae0ef6ea6.tar.lz
yuzu-38a11136744b814b12036527f84b71eae0ef6ea6.tar.xz
yuzu-38a11136744b814b12036527f84b71eae0ef6ea6.tar.zst
yuzu-38a11136744b814b12036527f84b71eae0ef6ea6.zip
Diffstat (limited to '')
-rw-r--r--src/common/timer.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/common/timer.h b/src/common/timer.h
index 78d37426b..27b521baa 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -4,6 +4,7 @@
#pragma once
+#include <chrono>
#include <string>
#include "common/common_types.h"
@@ -18,24 +19,22 @@ public:
// The time difference is always returned in milliseconds, regardless of alternative internal
// representation
- u64 GetTimeDifference();
+ std::chrono::milliseconds GetTimeDifference();
void AddTimeDifference();
- static void IncreaseResolution();
- static void RestoreResolution();
- static u64 GetTimeSinceJan1970();
- static u64 GetLocalTimeSinceJan1970();
+ static std::chrono::seconds GetTimeSinceJan1970();
+ static std::chrono::seconds GetLocalTimeSinceJan1970();
static double GetDoubleTime();
static std::string GetTimeFormatted();
std::string GetTimeElapsedFormatted() const;
- u64 GetTimeElapsed();
+ std::chrono::milliseconds GetTimeElapsed();
- static u32 GetTimeMs();
+ static std::chrono::milliseconds GetTimeMs();
private:
- u64 m_LastTime;
- u64 m_StartTime;
+ std::chrono::milliseconds m_LastTime;
+ std::chrono::milliseconds m_StartTime;
bool m_Running;
};