text: var timerID=null;
  var interval=100;
  
  self.onmessage=function(e){
  	if (e.data=="start") {
  		console.log("starting");
  		timerID=setInterval(function(){postMessage("tick");},interval)
  	}
  	else if (e.data.interval) {
  		postMessage("tick");
  		console.log("setting interval");
  		interval=e.data.interval;
  		console.log("interval="+interval);
  		if (timerID) {
  			clearInterval(timerID);
  			postMessage("tick")
  		}
  	}
  	else if (e.data=="stop") {
  		console.log("stopping");
  		clearInterval(timerID);
  		timerID=null;
  	}
  };
  
  postMessage('hi there');
  