--- nono/vm/rtc.cpp 2026/04/29 17:05:43 1.1.1.12 +++ nono/vm/rtc.cpp 2026/04/29 17:05:51 1.1.1.13 @@ -10,6 +10,7 @@ #include "rtc.h" #include "config.h" +#include "event.h" #include "scheduler.h" #include "syncer.h" @@ -79,10 +80,12 @@ RTCDevice::Init() rtc_tm.tm_sec = ss; } - event.func = ToEventCallback(&RTCDevice::Callback); - event.time = period; - event.SetName("RTC ClockIn"); - scheduler->RegistEvent(event); + auto evman = GetEventManager(); + event = evman->Regist(this, + ToEventCallback(&RTCDevice::Callback), + "RTC ClockIn"); + event->time = period; + return true; } @@ -229,7 +232,7 @@ RTCDevice::ParseTime(const std::string& // イベントハンドラ void -RTCDevice::Callback(Event& ev) +RTCDevice::Callback(Event *ev) { stime += period; ClockIn();