我想要每次迭代的随机到期时间。这个例子只会在 5~15 秒之间随机化一个过期时间并永远使用它们。
var timer = qx.util.TimerManager.getInstance();
timer.start(function(userData, timerId)
{
this.debug("timer tick");
},
(Math.floor(Math.random()*11)*1000) + 5000,
this,
null,
0
);
如果有的话,我也接受纯 JS 解决方案。
http://demo.qooxdoo.org/current/apiviewer/#qx.util.TimerManager