--- nono/vm/sysclk.h 2026/04/29 17:05:29 1.1.1.11 +++ nono/vm/sysclk.h 2026/04/29 17:05:50 1.1.1.13 @@ -11,10 +11,9 @@ #pragma once #include "device.h" -#include "event.h" -#include "monitor.h" class InterruptDevice; +class Syncer; class SysClkDevice : public IODevice { @@ -38,7 +37,7 @@ class SysClkDevice : public IODevice private: // イベントコールバック - void Callback(Event& ev); + void Callback(Event *ev); DECLARE_MONITOR_CALLBACK(MonitorUpdate); @@ -52,7 +51,7 @@ class SysClkDevice : public IODevice bool sysint {}; // 割り込みイベント - Event event { this }; + Event *event {}; // システムクロック周波数 [Hz] uint freq {}; @@ -63,12 +62,16 @@ class SysClkDevice : public IODevice // システムクロックが刻んでいる時刻 uint64 stime {}; + // 実時間との差 (表示用) + int64 delta {}; + // システムクロックを実時間に同期する場合 true bool sync_rt {}; InterruptDevice *interrupt {}; + Syncer *syncer {}; - Monitor monitor { this }; + Monitor *monitor {}; }; static inline SysClkDevice *GetSysClkDevice() {