mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(util) rm setTimeout
This commit is contained in:
parent
994d7af9ed
commit
3885a18681
1 changed files with 0 additions and 25 deletions
25
lib/util.js
25
lib/util.js
|
|
@ -750,31 +750,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* set timout before callback would be called
|
||||
* @param pArgs {func, callback, time}
|
||||
*/
|
||||
this.setTimeout = function(pArgs) {
|
||||
var lDone,
|
||||
lFunc = pArgs.func,
|
||||
lTime = pArgs.time || 1000,
|
||||
lCallBack = function(pArgument) {
|
||||
if (!lDone) {
|
||||
lDone = Util.exec(pArgs.callback, pArgument);
|
||||
}
|
||||
};
|
||||
|
||||
var lTimeoutFunc = function() {
|
||||
setTimeout(function() {
|
||||
Util.exec(lFunc, lCallBack);
|
||||
if (!lDone)
|
||||
lTimeoutFunc();
|
||||
}, lTime);
|
||||
};
|
||||
|
||||
lTimeoutFunc();
|
||||
};
|
||||
|
||||
/**
|
||||
* function makes new array based on first
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue