var ms = 1000;ms += new Date().getTime();while (new Date() < ms) { }
--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Ok, I was afraid of this.
setInterval(function(){alert('hi');},3000);
--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
// https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#b99xcz
Blockly.Blocks['wait'] = {
  init: function() {
    this.setHelpUrl('http://www.example.com/');
    this.setColour(60);
    this.appendDummyInput()
        .appendField("wait")
        .appendField(new Blockly.FieldDropdown([["half a second", "500"], ["a second", "1000"], ["two seconds", "2000"], ["five seconds", "5000"]]), "DELAY");
    this.setPreviousStatement(true, "null");
    this.setNextStatement(true, "null");
    this.setTooltip('');
  }
};
Blockly.JavaScript['wait'] = function(block) {
  var dropdown_delay = block.getFieldValue('DELAY');
  // TODO: Assemble JavaScript into code variable.
  var code = 'wait(' + dropdown_delay + ');\n';
  return code;
};
var nextStepDelay = 10;
function wait(d) {
  nextStepDelay = d;
}
function nextStep() {
  if (myInterpreter.step()) {
    var temp = nextStepDelay;
    nextStepDelay = 10;
    window.setTimeout(nextStep, temp);
  }
}var wrapper = function(d) {
  return interpreter.createPrimitive(wait(d));
}
interpreter.setProperty(scope, 'wait',
    interpreter.createNativeFunction(wrapper));--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
    function nextStep() {
      if (myInterpreter.step()) {
        window.setTimeout(nextStep, 0);
      }
    }
    nextStep();...discussed in the JS Interpreter docs.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
--
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.