diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2018-11-10 02:31:48 +0100 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2018-11-10 02:31:48 +0100 |
commit | 84c6134264e73945616cf847af149e3d8dec67bc (patch) | |
tree | 9b36bb1e59821ee02f8747aeb33e7690d1cddea4 /src/core/hle/service | |
parent | Implement GetClockSnapshot (diff) | |
download | yuzu-84c6134264e73945616cf847af149e3d8dec67bc.tar yuzu-84c6134264e73945616cf847af149e3d8dec67bc.tar.gz yuzu-84c6134264e73945616cf847af149e3d8dec67bc.tar.bz2 yuzu-84c6134264e73945616cf847af149e3d8dec67bc.tar.lz yuzu-84c6134264e73945616cf847af149e3d8dec67bc.tar.xz yuzu-84c6134264e73945616cf847af149e3d8dec67bc.tar.zst yuzu-84c6134264e73945616cf847af149e3d8dec67bc.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/time/time.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index dc504eaac..a3b3ffb8a 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -15,10 +15,10 @@ namespace Service::Time { -void PosixToCalendar(u64 posix_time, CalendarTime& calendar_time, - CalendarAdditionalInfo& additional_info, const TimeZoneRule& /*rule*/) { - std::time_t time(posix_time); - std::tm* tm = std::localtime(&time); +static void PosixToCalendar(u64 posix_time, CalendarTime& calendar_time, + CalendarAdditionalInfo& additional_info, const TimeZoneRule& /*rule*/) { + const std::time_t time(posix_time); + const std::tm* tm = std::localtime(&time); if (tm == nullptr) { return; } @@ -219,8 +219,8 @@ void Module::Interface::GetClockSnapshot(Kernel::HLERequestContext& ctx) { std::chrono::system_clock::now().time_since_epoch()) .count()}; CalendarTime calendar_time{}; - std::time_t time(time_since_epoch); - std::tm* tm = std::localtime(&time); + const std::time_t time(time_since_epoch); + const std::tm* tm = std::localtime(&time); if (tm == nullptr) { IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultCode(-1)); // TODO(ogniK): Find appropriate error code |