mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00: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…
Add table
Add a link
Reference in a new issue