Fixed bug with timer blocks; haven't gotten to reporter yet.
This commit is contained in:
parent
4d237ef389
commit
ebef6d5294
1 changed files with 3 additions and 3 deletions
|
@ -248,13 +248,13 @@ Interpreter.prototype.initPrims = function() {
|
|||
|
||||
// added by John:
|
||||
this.primitiveTable['showBubble'] = function(b) { console.log(interp.arg(b, 1)) }
|
||||
this.primitiveTable['timerReset'] = function(b) { interp.timerBase = new Date().getTime() }
|
||||
this.primitiveTable['timer'] = function(b) { return (new Date().getTime() - interp.timerBase) / 1000 }
|
||||
this.primitiveTable['timerReset'] = function(b) {interp.timerBase = (new Date()).getTime() }
|
||||
this.primitiveTable['timer'] = function(b) {return ((new Date()).getTime() - interp.timerBase) / 1000 }
|
||||
|
||||
new Primitives().addPrimsTo(this.primitiveTable);
|
||||
}
|
||||
|
||||
var timerBase = 0;
|
||||
Interpreter.prototype.timerBase = (new Date()).getTime();
|
||||
Interpreter.prototype.lookupPrim = function(op) {
|
||||
var fcn = interp.primitiveTable[op];
|
||||
if (fcn == null) fcn = function(b) { console.log('not implemented: ' + b.op) }
|
||||
|
|
Reference in a new issue