Creator 版本号:1.4.2
运行时目标平台: Web
onLoad: function () {
var tmp = 1
this.schedule(function () {
cc.log("execute", tmp)
tmp = tmp + 1
}, 1, 5)
},
以上代码的执行结果:

代码是执行5次,实际是执行了6次。
查看源码CCScheduler.js CallbackTimer.update
if (this._callback && !this._runForever && this._timesExecuted > this._repeat)
this.cancel();
执行次数_timesExecuted应该是等于重复次数的时候取消定时器。