title: Timer is not triggering after one minute using jQuery or give some other solution to trigger function after every 1 min?
body: <pre><code> var setTimer;
   var isTimeSet = false;
  
   if (!isTimeSet) {
      setTimer = $('#hdn_timerTime').val();
      isTimeSet = true;
      
    }
  
  
  
  initialTimer();
  function initialTimer() {        
      var CustomMinutes = 60 * parseInt(setTimer),
  
          display = $('#time'); 
      startTimer(CustomMinutes, display);
  }
  
  function startTimer(duration, display) {
     
      var timer = duration, minutes, seconds;
      setInterval(function () {
  
          minutes = parseInt(timer / 60, 10)
          seconds = parseInt(timer % 60, 10);
  
          minutes = minutes &lt; 10 ? &quot;0&quot; + minutes : minutes;
          seconds = seconds &lt; 10 ? &quot;0&quot; + seconds : seconds;
  
          display.text(minutes + &quot;:&quot; + seconds);
  
          if (--timer &lt; 0) {
           
              timer = duration;
              $('#outputmeters').val(JSON.stringify(listItem));
              // _hardMeter.UpdateMeterData();
              _hardMeter.TempUpdateMeterDataConfirmation();
  
          }
      }, 1000);
  }
  </code></pre>
  <p>This code I am using but for the first time it work fine than after that it time start reducing and function fire very quickly. I don't know how it happening.</p>
  <p>Please help me out in this and if you have some better solution for it. Could you please share it?</p>