Every line of 'set time interval in jquery' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
14 function setTimeInterval(time) { 15 resetTimeInterval(); 16 17 currentTime = time; 18 setTimeText(currentTime); 19 20 interval = setInterval(function() { 21 currentTime -= 1000; 22 setTimeText(currentTime); 23 24 if (currentTime <= 0) { 25 clearInterval(interval); 26 } 27 }, 1000); 28 }
49 setTimeout(function setUpdateInterval() { 50 updateUI(); 51 updateInterval = window.setInterval(function updating() { 52 updateUI(); 53 }, 60000); 54 }, (60 - date.getSeconds()) * 1000);
116 function set_interval(a,b) 117 { 118 if( This.timer_callback) 119 { 120 console.error('only one timer can be active at a time. please `clearInterval` before setting a new one.'); 121 return; 122 } 123 This.timer_callback = a; 124 This.target_interval = b; 125 This.timer = setInterval(frame, This.target_interval*0.5); 126 return This.timer; 127 }
18 function setTimer(timer, callback, interval) { 19 timers[timer.id] = { 20 callback, 21 interval, 22 lastRun: gameTime 23 }; 24 }
37 calculateTimerInterval() { 38 if (this.props.stop > this.props.start) { 39 return (this.props.stop - this.props.start) / 1000; 40 } 41 42 // This is technically an error, but it's not a serious one or one that we should expose to the user, so we 43 // ignore it 44 return 0; 45 }
11 function settime(obj) { 12 if (countdown == 0) { 13 obj.removeAttribute("disabled"); 14 obj.value = "免费获取验证码"; 15 countdown = 60; 16 return; 17 } else { 18 obj.setAttribute("disabled", true); 19 obj.value = "重新发送(" + countdown + ")"; 20 countdown--; 21 } 22 setTimeout(function () { 23 settime(obj) 24 }, 1000) 25 }
11 function setChartDuration(interval) { 12 var duration = '3000'; // base duration value 13 if (interval == '15m') { 14 duration = '15000'; 15 } else if (interval == '1h') { 16 duration = '60000'; 17 } else if (interval == '1d') { 18 duration = '300000'; 19 } else if (interval == '7d') { 20 duration = '1800000'; 21 } else if (interval == '30d') { 22 duration = '43200000'; 23 } else if (interval == 'at') { 24 duration = '1800000'; 25 } 26 return duration; 27 }
148 function time(that, wait){ 149 if (wait == 0) { 150 $(that).removeClass('disabled').prop('disabled',false); 151 $(that).html('重新发送验证码'); 152 } else { 153 $(that).html(wait+'秒后重新发送'); 154 wait--; 155 setTimeout(function(){ 156 time(that, wait); 157 }, 1000); 158 } 159 }
24 function setInterval(handler,time){ 25 if (isWeex){ 26 timer.setInterval(handler,time); 27 return document.taskCenter.callbackManager.lastCallbackId.toString(); 28 } else { 29 return window.setInterval(handler,time); 30 } 31 }
70 set(): void { 71 if (this.isSet) { 72 this.clear(false); 73 } 74 this._intervalId = setInterval(() => this._action(), this._intervalMs); 75 }