mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Update fakeworker.js
This commit is contained in:
parent
e91d9bd859
commit
8f09b72712
|
@ -72,7 +72,7 @@ function FakeWorker() {
|
|||
this.__intervals__.push({
|
||||
'id': this.__lastIntervalID__,
|
||||
'code': code,
|
||||
'delay': delay,
|
||||
'delay': 0, // replace to the callback
|
||||
'arguments': [],
|
||||
'timestamp': Date.now(),
|
||||
'cleared': false,
|
||||
|
@ -93,6 +93,7 @@ function FakeWorker() {
|
|||
this.__intervals__[i].delay = this.__intervals__[i].callback();
|
||||
}
|
||||
}
|
||||
cur = Date.now();
|
||||
}
|
||||
|
||||
return intervals;
|
||||
|
@ -107,6 +108,7 @@ function FakeWorker() {
|
|||
timeouts.push(this.__timeouts__[i]);
|
||||
this.__timeouts__[i].cleared = true;
|
||||
}
|
||||
cur = Date.now();
|
||||
}
|
||||
|
||||
return timeouts;
|
||||
|
@ -133,17 +135,17 @@ exports.repeat = function(target, worker, onError) {
|
|||
} catch (e) {
|
||||
if (typeof onError === "function") onError(e, i);
|
||||
}
|
||||
cur = Date.now();
|
||||
};
|
||||
cur = Date.now();
|
||||
}
|
||||
|
||||
end = Date.now();
|
||||
end = cur;
|
||||
}
|
||||
|
||||
return end;
|
||||
};
|
||||
|
||||
exports.VERSIONINFO = "FakeWorker module (fakeworker.js) version 0.0.3";
|
||||
exports.VERSIONINFO = "FakeWorker module (fakeworker.js) version 0.0.4";
|
||||
exports.AUTHOR = "catswords@protonmail.com";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user