1、连续调度,如果一次完成,剩余时间再次利用不浪费
npm install juggle-delayedcall
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../juggle-help/dist/juggle-help.js" type="text/javascript"></script>
<script src="../juggle-event/dist/juggle-event.js" type="text/javascript"></script>
<script src="../juggle-juggler/dist/juggle-juggler.js" type="text/javascript"></script>
<script src="../juggle-delayedcall/dist/juggle-delayedcall.js" type="text/javascript"></script>
<script type="text/javascript">
function delayCallFunc(arg) {
alert(delayedCall.isComplete());
}
var delayedCall;
window.onload = function () {
delayedCall = juggle.delayedCallPool.fromPool(delayCallFunc, 1, "1111");
delayedCall.mRepeatCount = 5;
juggle.jugglerManager.juggler.add(delayedCall);
}
</script>
</head>
<body>
</body>
</html>