artdaq_node_server  v1_00_09
 All Classes Namespaces Files Variables Pages
_baseDelay.js
1 
2 var FUNC_ERROR_TEXT = 'Expected a function';
3 
14 function baseDelay(func, wait, args) {
15  if (typeof func != 'function') {
16  throw new TypeError(FUNC_ERROR_TEXT);
17  }
18  return setTimeout(function() { func.apply(undefined, args); }, wait);
19 }
20 
21 module.exports = baseDelay;