Every line of 'clear setinterval' 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.
91 clear() { 92 if (this.started) { 93 clearTimeout(this.timerId); 94 this.remaining = this.delay; 95 this.started = false; 96 } 97 }
57 clear () { 58 this.sleep(); 59 60 this.timestamp = null; 61 }
1384 clear () { 1385 clearTimeout(this.timer) 1386 }
34 clearInterval () { 35 clearInterval(this.refreshData); 36 delete this.refreshData; 37 }
218 _clearInterval() { 219 clearInterval(this._interval); 220 this._interval = null; 221 }
29 function SetInterval() { 30 this.key = {}; 31 32 /** 33 * @param {Function} fn 34 * @param {Number} interval 35 * @param {String} key 36 */ 37 this.start = function start(fn, interval, key) { 38 if (!this.key[key]) { 39 this.key[key] = setInterval(function () { 40 fn(); 41 }, interval); 42 } 43 } 44 45 /** 46 * @param {String} key 47 */ 48 this.clear = function clear(key) { 49 if (this.key[key]) { 50 clearInterval(this.key[key]); 51 delete this.key[key]; 52 } 53 } 54 }
21 _clear () { 22 if (typeof this.timeoutId !== 'undefined') { 23 clearTimeout(this.timeoutId) 24 this.timeoutId = undefined 25 } 26 this.items = [] 27 }
70 set(): void { 71 if (this.isSet) { 72 this.clear(false); 73 } 74 this._intervalId = setInterval(() => this._action(), this._intervalMs); 75 }
25 public clear() { 26 clearInterval(this.interval); 27 this.interval = null; 28 }
88 clearInterval() { 89 clearInterval(this.interval); 90 }