Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clearinterval in javascript

 var startTime = new Date().getTime();
var interval = setInterval(function(){
    if(new Date().getTime() - startTime > 5000){
        clearInterval(interval);
        return;
    }else{
      graph()
    }
    //do whatever here..
}, 1000);     
  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clearinterval #javascript
ADD COMMENT
Topic
Name
5+5 =