interface.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2018 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> time, std::shared_ptr<SharedMemory> shared_memory,
  7. Core::System& system, const char* name)
  8. : Module::Interface(std::move(time), std::move(shared_memory), system, name) {
  9. // clang-format off
  10. static const FunctionInfo functions[] = {
  11. {0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"},
  12. {1, &Time::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"},
  13. {2, &Time::GetStandardSteadyClock, "GetStandardSteadyClock"},
  14. {3, &Time::GetTimeZoneService, "GetTimeZoneService"},
  15. {4, &Time::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"},
  16. {5, nullptr, "GetEphemeralNetworkSystemClock"},
  17. {20, &Time::GetSharedMemoryNativeHandle, "GetSharedMemoryNativeHandle"},
  18. {30, nullptr, "GetStandardNetworkClockOperationEventReadableHandle"},
  19. {31, nullptr, "GetEphemeralNetworkClockOperationEventReadableHandle"},
  20. {50, nullptr, "SetStandardSteadyClockInternalOffset"},
  21. {100, &Time::IsStandardUserSystemClockAutomaticCorrectionEnabled, "IsStandardUserSystemClockAutomaticCorrectionEnabled"},
  22. {101, &Time::SetStandardUserSystemClockAutomaticCorrectionEnabled, "SetStandardUserSystemClockAutomaticCorrectionEnabled"},
  23. {102, nullptr, "GetStandardUserSystemClockInitialYear"},
  24. {200, nullptr, "IsStandardNetworkSystemClockAccuracySufficient"},
  25. {201, nullptr, "GetStandardUserSystemClockAutomaticCorrectionUpdatedTime"},
  26. {300, nullptr, "CalculateMonotonicSystemClockBaseTimePoint"},
  27. {400, &Time::GetClockSnapshot, "GetClockSnapshot"},
  28. {401, nullptr, "GetClockSnapshotFromSystemClockContext"},
  29. {500, &Time::CalculateStandardUserSystemClockDifferenceByUser, "CalculateStandardUserSystemClockDifferenceByUser"},
  30. {501, nullptr, "CalculateSpanBetween"},
  31. };
  32. // clang-format on
  33. RegisterHandlers(functions);
  34. }
  35. Time::~Time() = default;
  36. } // namespace Service::Time