Added support for timer reporter.
This commit is contained in:
parent
ebef6d5294
commit
296e2fa35c
2 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue