Only log when DEBUG log level is enabled

This commit is contained in:
Niclas Finne 2013-08-20 19:14:03 +02:00
parent 967b552612
commit 12a887ff58
1 changed files with 2 additions and 2 deletions

View File

@ -285,11 +285,11 @@ public class Timer extends IOUnit {
/* trigger if trigger should be... */
if ((tcctl & CC_TRIGGER_INT) == CC_TRIGGER_INT) {
if (index == 0) {
log("triggering interrupt");
if (DEBUG) log("triggering interrupt");
cpu.flagInterrupt(interruptVector, Timer.this, true);
} else if (lastTIV == 0) {
lastTIV = index * 2;
log("triggering interrupt TIV: " + lastTIV);
if (DEBUG) log("triggering interrupt TIV: " + lastTIV);
cpu.flagInterrupt(interruptVector, Timer.this, true);
} else if (lastTIV > index * 2) {
/* interrupt already triggered, but set to this lower IRQ */