Update task.js

This commit is contained in:
Namhyeon Go 2021-06-23 15:00:17 +09:00 committed by GitHub
parent 4382867eb8
commit 317d0d60b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,11 +16,11 @@
* // taskQueue.run();
*/
var Task = function(f, params)
var Task = function(f, params, when)
this.f = f;
this.params = params;
this.nextTask = null;
this.when = 0;
this.when = (typeof(when) === "number" ? when : 0);
this.setNextTask = function(task) {
this.nextTask = task;
}