summaryrefslogtreecommitdiffstats
path: root/src/common/steady_clock.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-03-02 01:17:50 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2023-03-05 07:41:19 +0100
commitbd09c825218aac9255643b9aa7c75f5ba156038c (patch)
tree76a7fb4a83ec09a927767d9f8c8a3342107c67cd /src/common/steady_clock.h
parentMerge pull request #9884 from liamwhite/service-cleanup (diff)
downloadyuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.tar
yuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.tar.gz
yuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.tar.bz2
yuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.tar.lz
yuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.tar.xz
yuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.tar.zst
yuzu-bd09c825218aac9255643b9aa7c75f5ba156038c.zip
Diffstat (limited to '')
-rw-r--r--src/common/steady_clock.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/common/steady_clock.h b/src/common/steady_clock.h
new file mode 100644
index 000000000..9497cf865
--- /dev/null
+++ b/src/common/steady_clock.h
@@ -0,0 +1,23 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <chrono>
+
+#include "common/common_types.h"
+
+namespace Common {
+
+struct SteadyClock {
+ using rep = s64;
+ using period = std::nano;
+ using duration = std::chrono::nanoseconds;
+ using time_point = std::chrono::time_point<SteadyClock>;
+
+ static constexpr bool is_steady = true;
+
+ [[nodiscard]] static time_point Now() noexcept;
+};
+
+} // namespace Common