This commit is contained in:
lizzie 2026-03-18 05:00:57 +00:00
parent 57ccf51d99
commit 36b77f2e47
10 changed files with 33 additions and 15 deletions

View file

@ -257,7 +257,7 @@ Result AlbumManager::SaveScreenShot(ApplicationAlbumEntry& out_entry,
static_service->GetStandardUserSystemClock(&user_clock);
s64 posix_time{};
auto result = user_clock->GetCurrentTime(&posix_time);
auto result = user_clock->GetCurrentClockTime(&posix_time);
if (result.IsError()) {
return result;
@ -279,7 +279,7 @@ Result AlbumManager::SaveEditedScreenShot(ApplicationAlbumEntry& out_entry,
static_service->GetStandardUserSystemClock(&user_clock);
s64 posix_time{};
auto result = user_clock->GetCurrentTime(&posix_time);
auto result = user_clock->GetCurrentClockTime(&posix_time);
if (result.IsError()) {
return result;

View file

@ -232,7 +232,7 @@ INotificationServices::INotificationServices(Core::System& system_)
{2020, nullptr, "IsAlarmSettingReady"},
{8000, nullptr, "RegisterAppletResourceUserId"},
{8010, nullptr, "UnregisterAppletResourceUserId"},
{8999, nullptr, "GetCurrentTime"},
{8999, nullptr, "GetCurrentClockTime"},
{9000, nullptr, "GetAlarmSettingNextNotificationTime"},
};
// clang-format on

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -13,7 +16,7 @@ void FileTimestampWorker::SetFilesystemPosixTime() {
Service::PSC::Time::CalendarTime calendar_time{};
Service::PSC::Time::CalendarAdditionalInfo additional_info{};
if (m_initialized && m_system_clock->GetCurrentTime(&time) == ResultSuccess &&
if (m_initialized && m_system_clock->GetCurrentClockTime(&time) == ResultSuccess &&
m_time_zone->ToCalendarTimeWithMyRule(&calendar_time, &additional_info, time) ==
ResultSuccess) {
// TODO IFileSystemProxy::SetCurrentPosixTime

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
@ -179,7 +179,7 @@ TimeManager::TimeManager(Core::System& system)
m_file_timestamp_worker.m_initialized = true;
s64 system_clock_time{};
if (m_file_timestamp_worker.m_system_clock->GetCurrentTime(&system_clock_time) ==
if (m_file_timestamp_worker.m_system_clock->GetCurrentClockTime(&system_clock_time) ==
ResultSuccess) {
Service::PSC::Time::CalendarTime calendar_time{};
Service::PSC::Time::CalendarAdditionalInfo calendar_additional{};

View file

@ -201,7 +201,7 @@ void TimeWorker::ThreadFunc(std::stop_token stop_token) {
m_set_sys->SetNetworkSystemClockContext(context);
s64 time{};
if (m_network_clock->GetCurrentTime(&time) != ResultSuccess) {
if (m_network_clock->GetCurrentClockTime(&time) != ResultSuccess) {
break;
}
@ -230,7 +230,7 @@ void TimeWorker::ThreadFunc(std::stop_token stop_token) {
}
s64 time{};
res = m_ephemeral_clock->GetCurrentTime(&time);
res = m_ephemeral_clock->GetCurrentClockTime(&time);
if (res != ResultSuccess) {
break;
}

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -45,7 +48,7 @@ NetworkSystemClockContextWriter::NetworkSystemClockContextWriter(Core::System& s
Result NetworkSystemClockContextWriter::Write(const SystemClockContext& context) {
s64 time{};
[[maybe_unused]] auto res = m_system_clock.GetCurrentTime(&time);
[[maybe_unused]] auto res = m_system_clock.GetCurrentClockTime(&time);
if (m_in_use) {
R_SUCCEED_IF(context == m_context);

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -20,7 +23,7 @@ bool SystemClockCore::CheckClockSourceMatches() {
return context.steady_time_point.IdMatches(time_point);
}
Result SystemClockCore::GetCurrentTime(s64* out_time) const {
Result SystemClockCore::GetCurrentClockTime(s64* out_time) const {
R_UNLESS(out_time != nullptr, ResultInvalidArgument);
SystemClockContext context{};

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -33,7 +36,7 @@ public:
bool CheckClockSourceMatches();
Result GetCurrentTime(s64* out_time) const;
Result GetCurrentClockTime(s64* out_time) const;
Result SetCurrentTime(s64 time);
Result GetCurrentTimePoint(SteadyClockTimePoint& out_time_point) {

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -15,7 +18,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo
can_write_uninitialized_clock} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&SystemClock::GetCurrentTime>, "GetCurrentTime"},
{0, D<&SystemClock::GetCurrentClockTime>, "GetCurrentClockTime"},
{1, D<&SystemClock::SetCurrentTime>, "SetCurrentTime"},
{2, D<&SystemClock::GetSystemClockContext>, "GetSystemClockContext"},
{3, D<&SystemClock::SetSystemClockContext>, "SetSystemClockContext"},
@ -25,7 +28,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo
RegisterHandlers(functions);
}
Result SystemClock::GetCurrentTime(Out<s64> out_time) {
Result SystemClock::GetCurrentClockTime(Out<s64> out_time) {
SCOPE_EXIT {
LOG_DEBUG(Service_Time, "called. out_time={}", *out_time);
};
@ -33,7 +36,7 @@ Result SystemClock::GetCurrentTime(Out<s64> out_time) {
R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(),
ResultClockUninitialized);
R_RETURN(m_clock_core.GetCurrentTime(out_time.Get()));
R_RETURN(m_clock_core.GetCurrentClockTime(out_time.Get()));
}
Result SystemClock::SetCurrentTime(s64 time) {

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -23,7 +26,7 @@ public:
~SystemClock() override = default;
Result GetCurrentTime(Out<s64> out_time);
Result GetCurrentClockTime(Out<s64> out_time);
Result SetCurrentTime(s64 time);
Result GetSystemClockContext(Out<SystemClockContext> out_context);
Result SetSystemClockContext(const SystemClockContext& context);