interface.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2019 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "core/hle/service/time/interface.h"
  5. namespace Service::Time {
  6. Time::Time(std::shared_ptr<Module> module, Core::System& system, const char* name)
  7. : Module::Interface(std::move(module), system, name) {
  8. // clang-format off
  9. static const FunctionInfo functions[] = {
  10. {0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"},
  11. {1, &Time::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"},
  12. {2, &Time::GetStandardSteadyClock, "GetStandardSteadyClock"},
  13. {3, &Time::GetTimeZoneService, "GetTimeZoneService"},
  14. {4, &Time::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"},
  15. {5, nullptr, "GetEphemeralNetworkSystemClock"},
  16. {20, &Time::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"},
  17. {30, nullptr, "GetStandardNetworkClockOperationEventReadableHandle"},
  18. {31, nullptr, "GetEphemeralNetworkClockOperationEventReadableHandle"},
  19. {50, nullptr, "SetStandardSteadyClockInternalOffset"},
  20. {51, nullptr, "GetStandardSteadyClockRtcValue"},
  21. {100, nullptr, "IsStandardUserSystemClockAutomaticCorrectionEnabled"},
  22. {101, nullptr, "SetStandardUserSystemClockAutomaticCorrectionEnabled"},
  23. {102, nullptr, "GetStandardUserSystemClockInitialYear"},
  24. {200, &Time::IsStandardNetworkSystemClockAccuracySufficient, "IsStandardNetworkSystemClockAccuracySufficient"},
  25. {201, nullptr, "GetStandardUserSystemClockAutomaticCorrectionUpdatedTime"},
  26. {300, &Time::CalculateMonotonicSystemClockBaseTimePoint, "CalculateMonotonicSystemClockBaseTimePoint"},
  27. {400, &Time::GetClockSnapshot, "GetClockSnapshot"},
  28. {401, &Time::GetClockSnapshotFromSystemClockContext, "GetClockSnapshotFromSystemClockContext"},
  29. {500, &Time::CalculateStandardUserSystemClockDifferenceByUser, "CalculateStandardUserSystemClockDifferenceByUser"},
  30. {501, &Time::CalculateSpanBetween, "CalculateSpanBetween"},
  31. };
  32. // clang-format on
  33. RegisterHandlers(functions);
  34. }
  35. Time::~Time() = default;
  36. } // namespace Service::Time