mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-19 02:00:38 +01:00
Add query duration Fixes #76
This commit is contained in:
parent
e3bda42144
commit
2cf975b9f6
1 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,8 @@ class Core extends EventEmitter {
|
||||||
state.query.type = this.type;
|
state.query.type = this.type;
|
||||||
if('pretty' in this) state.query.pretty = this.pretty;
|
if('pretty' in this) state.query.pretty = this.pretty;
|
||||||
|
|
||||||
|
state.duration = Date.now() - this.startMillis;
|
||||||
|
|
||||||
this.reset();
|
this.reset();
|
||||||
this.finished = true;
|
this.finished = true;
|
||||||
this.emit('finished',state);
|
this.emit('finished',state);
|
||||||
|
@ -98,6 +100,8 @@ class Core extends EventEmitter {
|
||||||
const options = this.options;
|
const options = this.options;
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
||||||
|
this.startMillis = Date.now();
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
(c) => {
|
(c) => {
|
||||||
// resolve host names
|
// resolve host names
|
||||||
|
|
Loading…
Reference in a new issue