Esempio n. 1
0
 public void ExternalCallback(Dcpu cpu)
 {
     if (_interruptMessage == 0 || _doInterrupt == false)
         return;
     _doInterrupt = false;
     cpu.SendInterrupt(new Interrupt(_interruptMessage));
 }
Esempio n. 2
0
 public void ExternalCallback(Dcpu cpu)
 {
     if (_interruptMessage == 0 || _doInterrupt == false)
     {
         return;
     }
     _doInterrupt = false;
     cpu.SendInterrupt(new Interrupt(_interruptMessage));
 }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
        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));
        }