Added support for timer reporter.

This commit is contained in:
Scimonster 2013-10-30 15:50:29 +02:00
parent ebef6d5294
commit 296e2fa35c
2 changed files with 4 additions and 0 deletions

View file

@ -99,6 +99,9 @@ Reporter.prototype.update = function() {
case 'costumeIndex': case 'costumeIndex':
newValue = target.currentCostumeIndex + 1; newValue = target.currentCostumeIndex + 1;
break; break;
case 'timer':
newValue = interp.primitiveTable.timer().toFixed(3);
break;
} }
this.valueEl.html(newValue); this.valueEl.html(newValue);
if (this.mode == 3) if (this.mode == 3)

View file

@ -75,6 +75,7 @@ Runtime.prototype.greenFlag = function() {
if (this.projectLoaded) { if (this.projectLoaded) {
interp.activeThread = new Thread(null); interp.activeThread = new Thread(null);
interp.threads = []; interp.threads = [];
interp.primitiveTable.timerReset();
this.startGreenFlags(); this.startGreenFlags();
} }
} }