code: function frame(frameTime) {
  		// Steal the current execution queue, and switch it with
  		// a new one so that calls from handlers will be queued.
  		var handlers = nextBatch; nextBatch = {};
  		// Calculate time since last frame.
  		var elapsed = frameTime - lastFrameTime;
  		// We are taking care of this frame, so allow another
  		// frame to be requested from inside the handlers.
  		pendingFrame = false;
  		// Replay each call with its own context and arguments.
  		for (var k in handlers) {
  			handlers[k](elapsed);
  		}
  		// Keep track of updated frame time.
  		lastFrameTime = frameTime;
  	}
docs: /*
  Executes the batch of handlers