Merge pull request #20 from nfi/timer-log

Only log when debug log level is enabled
This commit is contained in:
Joakim Eriksson 2013-08-22 12:45:24 -07:00
commit 57cb447c92
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 */