mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
12 lines
219 B
JavaScript
12 lines
219 B
JavaScript
var msDelay = 0;
|
|
|
|
var delay = (function(){
|
|
return function(callback, ms){
|
|
clearTimeout(msDelay);
|
|
msDelay = setTimeout(callback, ms);
|
|
};
|
|
})();
|
|
|
|
function cancelTimer(){
|
|
clearTimeout(msDelay);
|
|
} |