public void ExternalCallback(Dcpu cpu) { if (_interruptMessage == 0 || _doInterrupt == false) return; _doInterrupt = false; cpu.SendInterrupt(new Interrupt(_interruptMessage)); }
public void ExternalCallback(Dcpu cpu) { if (_interruptMessage == 0 || _doInterrupt == false) { return; } _doInterrupt = false; cpu.SendInterrupt(new Interrupt(_interruptMessage)); }
public void ExternalCallback(Dcpu cpu) { if (_rate == 0) return; var nextTickTime = _lastTick + TimeSpan.FromSeconds(_rate / 60.0); if (DateTime.UtcNow < nextTickTime) return; _lastTick = nextTickTime; cpu.SendInterrupt(new Interrupt(_message)); }
public void ExternalCallback(Dcpu cpu) { if (_rate == 0) { return; } var nextTickTime = _lastTick + TimeSpan.FromSeconds(_rate / 60.0); if (DateTime.UtcNow < nextTickTime) { return; } _lastTick = nextTickTime; cpu.SendInterrupt(new Interrupt(_message)); }