Files
tactility/Tactility/Include/Tactility/service/rtctime/RtcTimeService.h
T
Ken Van Hoeylandt acb2f1d4c7 Replace Tactility SystemEvents with new kernel implementation (#598)
TactilityKernel now has a system event API to replace the one from the Tactility subproject. It also implements several tests for it.
2026-07-29 17:31:20 +02:00

32 lines
653 B
C++

#pragma once
#include <Tactility/service/Service.h>
#include <memory>
struct Device;
struct SystemEvent;
namespace tt::service::rtctime {
class RtcTimeService final : public Service {
bool timeEventSubscribed = false;
Device* rtcDevice = nullptr;
Device* findRtcDevice();
void onTimeChanged();
static void onTimeChangedTrampoline(struct SystemEvent* event, void* context);
public:
bool onStart(ServiceContext& serviceContext) override;
void onStop(ServiceContext& serviceContext) override;
bool isAvailable() const;
};
std::shared_ptr<RtcTimeService> findRtcTimeService();
} // namespace tt::service::rtctime