calcLoop()

in src/editor/sandbox/loopController.js [30:48]


  calcLoop(loopID) {
    if (this._loopMap.has(loopID)) {
      let { isInit, totalExecTime, startTime, count } = this.getLoop(loopID);
      if (isInit) {
        totalExecTime = Date.now() - startTime;
        count++;
        this.setLoop(loopID, {
          isInit,
          totalExecTime,
          startTime,
          count
        });
      } else {
        this.initLoop(loopID);
      }
    } else {
      this.initLoop(loopID);
    }
  },