Skip to content

Commit

Permalink
fix: fix duration_ms to be milliseconds
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#44450
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
(cherry picked from commit 6ee1f3444f8c1cf005153f936ffc74221d55658b)
  • Loading branch information
MoLow committed Feb 2, 2023
1 parent d885ee2 commit 27241c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/test_runner/test.js
@@ -1,4 +1,4 @@
// https://github.com/nodejs/node/blob/59527de13d39327eb3dfa8dedc92241eb40066d5/lib/internal/test_runner/test.js
// https://github.com/nodejs/node/blob/6ee1f3444f8c1cf005153f936ffc74221d55658b/lib/internal/test_runner/test.js

'use strict'

Expand Down Expand Up @@ -617,8 +617,8 @@ class Test extends AsyncResource {
}

#duration () {
// Duration is recorded in BigInt nanoseconds. Convert to seconds.
return Number(this.endTime - this.startTime) / 1_000_000_000
// Duration is recorded in BigInt nanoseconds. Convert to milliseconds.
return Number(this.endTime - this.startTime) / 1_000_000
}

report () {
Expand Down

0 comments on commit 27241c3

Please sign in to comment.