time_interface.cpp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "core/hle/service/time/time_interface.h"
  4. namespace Service::Time {
  5. Time::Time(std::shared_ptr<Module> module_, Core::System& system_, const char* name_)
  6. : Interface{std::move(module_), system_, name_} {
  7. // clang-format off
  8. static const FunctionInfo functions[] = {
  9. {0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"},
  10. {1, &Time::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"},
  11. {2, &Time::GetStandardSteadyClock, "GetStandardSteadyClock"},
  12. {3, &Time::GetTimeZoneService, "GetTimeZoneService"},
  13. {4, &Time::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"},
  14. {5, nullptr, "GetEphemeralNetworkSystemClock"},
  15. {20, &Time::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"},
  16. {30, nullptr, "GetStandardNetworkClockOperationEventReadableHandle"},
  17. {31, nullptr, "GetEphemeralNetworkClockOperationEventReadableHandle"},
  18. {50, nullptr, "SetStandardSteadyClockInternalOffset"},
  19. {51, nullptr, "GetStandardSteadyClockRtcValue"},
  20. {100, nullptr, "IsStandardUserSystemClockAutomaticCorrectionEnabled"},
  21. {101, nullptr, "SetStandardUserSystemClockAutomaticCorrectionEnabled"},
  22. {102, nullptr, "GetStandardUserSystemClockInitialYear"},
  23. {200, &Time::IsStandardNetworkSystemClockAccuracySufficient, "IsStandardNetworkSystemClockAccuracySufficient"},
  24. {201, nullptr, "GetStandardUserSystemClockAutomaticCorrectionUpdatedTime"},
  25. {300, &Time::CalculateMonotonicSystemClockBaseTimePoint, "CalculateMonotonicSystemClockBaseTimePoint"},
  26. {400, &Time::GetClockSnapshot, "GetClockSnapshot"},
  27. {401, &Time::GetClockSnapshotFromSystemClockContext, "GetClockSnapshotFromSystemClockContext"},
  28. {500, &Time::CalculateStandardUserSystemClockDifferenceByUser, "CalculateStandardUserSystemClockDifferenceByUser"},
  29. {501, &Time::CalculateSpanBetween, "CalculateSpanBetween"},
  30. };
  31. // clang-format on
  32. RegisterHandlers(functions);
  33. }
  34. Time::~Time() = default;
  35. } // namespace Service::Time