summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar ameerj2021-10-16 02:07:18 -0400
committerGravatar ameerj2021-10-17 00:37:49 -0400
commitef811c64259f0b83aa72c99bad9d4e48082129f8 (patch)
tree68a10f30c76c06fe2cbd7893d6481e7372e57613 /src/core/hle
parentMerge pull request #7190 from Morph1984/missing-ui-main (diff)
downloadyuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.gz
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.xz
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.zip
settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/time/time_manager.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp
index 4bbc606a1..9c4c960ef 100644
--- a/src/core/hle/service/time/time_manager.cpp
+++ b/src/core/hle/service/time/time_manager.cpp
@@ -13,18 +13,19 @@
13#include "core/hle/service/time/time_manager.h" 13#include "core/hle/service/time/time_manager.h"
14 14
15namespace Service::Time { 15namespace Service::Time {
16 16namespace {
17constexpr Clock::TimeSpanType standard_network_clock_accuracy{0x0009356907420000ULL}; 17constexpr Clock::TimeSpanType standard_network_clock_accuracy{0x0009356907420000ULL};
18 18
19static std::chrono::seconds GetSecondsSinceEpoch() { 19s64 GetSecondsSinceEpoch() {
20 return std::chrono::duration_cast<std::chrono::seconds>( 20 const auto time_since_epoch = std::chrono::system_clock::now().time_since_epoch();
21 std::chrono::system_clock::now().time_since_epoch()) + 21 return std::chrono::duration_cast<std::chrono::seconds>(time_since_epoch).count() +
22 Settings::values.custom_rtc_differential; 22 Settings::values.custom_rtc_differential;
23} 23}
24 24
25static s64 GetExternalRtcValue() { 25s64 GetExternalRtcValue() {
26 return GetSecondsSinceEpoch().count() + TimeManager::GetExternalTimeZoneOffset(); 26 return GetSecondsSinceEpoch() + TimeManager::GetExternalTimeZoneOffset();
27} 27}
28} // Anonymous namespace
28 29
29struct TimeManager::Impl final { 30struct TimeManager::Impl final {
30 explicit Impl(Core::System& system) 31 explicit Impl(Core::System& system)