title: how to calculate time during mousedown event in jquery?
body: <p>I am trying to do 2 different functionalities on one button on mousedown - up events.
  But its not working as i cant able to detect time on mousedown event.</p>
  
  <pre><code>var flag;  
  $("#ClikerButton").mousedown(function(e){  
      //if mouse pressed more than 2 sec, then  
      // do func1 and set flag = true;  
           //else do nothing  
  }).mouseup(function(e){  
  //if flag == true, do nothing,  
  //else do func2;  
  });  
  </code></pre>