mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-23 04:52:00 +00:00
Store time when gather is completed
This commit is contained in:
parent
b438d5b02c
commit
cac0338e01
1 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,9 @@ function Gather (options) {
|
|||
startTime: null,
|
||||
timer: null
|
||||
};
|
||||
this.done = {
|
||||
time: null
|
||||
};
|
||||
this.initState();
|
||||
}
|
||||
|
||||
|
@ -132,6 +135,7 @@ StateMachine.create({
|
|||
|
||||
// On enter done
|
||||
onenterdone: () => {
|
||||
this.done.time = new Date();
|
||||
this.onDone.call(this);
|
||||
}
|
||||
}
|
||||
|
@ -292,6 +296,9 @@ Gather.prototype.toJson = () => {
|
|||
election: {
|
||||
startTime: this.electionStartTime(),
|
||||
interval: this.election.INTERVAL
|
||||
},
|
||||
done: {
|
||||
time: this.done.time
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue