Store time when gather is completed

This commit is contained in:
Chris Blanchard 2015-09-20 13:00:15 +01:00
parent b438d5b02c
commit cac0338e01
1 changed files with 7 additions and 0 deletions

View File

@ -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
}
}
};