summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-10-16 08:07:18 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-10-17 06:37:49 +0200
commitef811c64259f0b83aa72c99bad9d4e48082129f8 (patch)
tree68a10f30c76c06fe2cbd7893d6481e7372e57613 /src/core/hle/service
parentMerge pull request #7190 from Morph1984/missing-ui-main (diff)
downloadyuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.gz
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.bz2
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.lz
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.xz
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.tar.zst
yuzu-ef811c64259f0b83aa72c99bad9d4e48082129f8.zip
Diffstat (limited to 'src/core/hle/service')
-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 @@
#include "core/hle/service/time/time_manager.h"
namespace Service::Time {
-
+namespace {
constexpr Clock::TimeSpanType standard_network_clock_accuracy{0x0009356907420000ULL};
-static std::chrono::seconds GetSecondsSinceEpoch() {
- return std::chrono::duration_cast<std::chrono::seconds>(
- std::chrono::system_clock::now().time_since_epoch()) +
+s64 GetSecondsSinceEpoch() {
+ const auto time_since_epoch = std::chrono::system_clock::now().time_since_epoch();
+ return std::chrono::duration_cast<std::chrono::seconds>(time_since_epoch).count() +
Settings::values.custom_rtc_differential;
}
-static s64 GetExternalRtcValue() {
- return GetSecondsSinceEpoch().count() + TimeManager::GetExternalTimeZoneOffset();
+s64 GetExternalRtcValue() {
+ return GetSecondsSinceEpoch() + TimeManager::GetExternalTimeZoneOffset();
}
+} // Anonymous namespace
struct TimeManager::Impl final {
explicit Impl(Core::System& system)