timer60hzCallback method

void timer60hzCallback(
  1. Timer _
)

Implementation

void timer60hzCallback(Timer _) {
  if (_chip8.soundTimer > 0) {
    _chip8.soundTimer--;
    if (_chip8.soundTimer == 0) _sendPort.send(Chip8StopSoundEvent());
  }

  if (_chip8.delayTimer > 0) _chip8.delayTimer--;

  _sendPort.send(_chip8.display);
}