Skip to content

Commit

Permalink
use seconds in timer measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
vpalmisano committed Sep 16, 2024
1 parent 72f4252 commit 159c951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/peer-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ webrtcperf.Timer = class {
this.lastTime = Date.now()
this.timer = setInterval(() => {
const now = Date.now()
this.duration += now - this.lastTime
this.duration += (now - this.lastTime) / 1000
this.lastTime = now
}, 1000)
}
Expand All @@ -32,7 +32,7 @@ webrtcperf.Timer = class {
clearInterval(this.timer)
this.timer = null
if (this.lastTime) {
this.duration += Date.now() - this.lastTime
this.duration += (Date.now() - this.lastTime) / 1000
this.lastTime = 0
}
}
Expand Down

0 comments on commit 159c951

Please sign in to comment.