--- nono/hd64180/hd647180dev.cpp 2026/04/29 17:05:51 1.1.1.2 +++ nono/hd64180/hd647180dev.cpp 2026/04/29 17:06:01 1.1.1.3 @@ -37,8 +37,8 @@ MPU64180Device::EnableTimer() // 停止していたのを開始する時だけ次の tick までの時間を求める。 uint64 now = scheduler->GetVirtTime() - timer_epoch; - uint64 tick = now / (clock_nsec * 20); - uint64 next = (tick + 1) * (clock_nsec * 20); + uint64 tick = now / (clock_tsec * 20); + uint64 next = (tick + 1) * (clock_tsec * 20); timer_event->time = next - now; scheduler->StartEvent(timer_event); @@ -87,9 +87,9 @@ MPU64180Device::TimerCallback(Event *ev) // タイマーへの入力は原クロックの20倍なので、 // 厳密には 162.7604… * 20 = 3.255… [nsec] だが、 - // ここでは clock_nsec * 20 = 3.260 [nsec] とする。 + // ここでは clock_tsec * 20 = 3.260 [nsec] とする。 // この代入は本当は1回目だけでいいのだが。 - timer_event->time = clock_nsec * 20; + timer_event->time = clock_tsec * 20; scheduler->RestartEvent(ev); }