mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-16 00:38:31 +01:00
fix: move a start time indicator closer to the source
This commit is contained in:
parent
ae02aa79e4
commit
ecd1630b11
1 changed files with 1 additions and 2 deletions
|
@ -102,10 +102,9 @@ export default class Core extends EventEmitter {
|
|||
|
||||
/** Param can be a time in ms, or a promise (which will be timed) */
|
||||
async registerRtt (param) {
|
||||
const start = Date.now()
|
||||
|
||||
try {
|
||||
if (param instanceof Promise) {
|
||||
const start = Date.now()
|
||||
await param
|
||||
await this.registerRtt(Date.now() - start)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue