Every line of 'clear interval' 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.
57 clear () { 58 this.sleep(); 59 60 this.timestamp = null; 61 }
15 function clearIntervals(onlyClearWhenLiveTimers = false) { 16 let intervals; 17 if (onlyClearWhenLiveTimers) { 18 intervals = Object.values(timerIntervalCache).filter(i => i.onlyWhenLive); 19 } else { 20 intervals = Object.values(timerIntervalCache); 21 } 22 23 console.log("clearing: ", intervals); 24 intervals.forEach(i => { 25 clearInterval(i.intervalId); 26 delete timerIntervalCache[i.timerId]; 27 }); 28 }
91 clear() { 92 if (this.started) { 93 clearTimeout(this.timerId); 94 this.remaining = this.delay; 95 this.started = false; 96 } 97 }
1384 clear () { 1385 clearTimeout(this.timer) 1386 }
70 set(): void { 71 if (this.isSet) { 72 this.clear(false); 73 } 74 this._intervalId = setInterval(() => this._action(), this._intervalMs); 75 }
366 function clearIntervals() { 367 for(var key in $scope.intervals) { 368 if($scope.intervals.hasOwnProperty(key)) { 369 clearInterval($scope.intervals[key]); 370 } 371 } 372 }
21 _clear () { 22 if (typeof this.timeoutId !== 'undefined') { 23 clearTimeout(this.timeoutId) 24 this.timeoutId = undefined 25 } 26 this.items = [] 27 }