File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 88
99Find the process's time resolution.
1010
11- The time resolution is a combination of both software and hardware factors. This
12- finds it by creating many timestamps in a row and computing it their common
11+ The time resolution is a combination of multiple software and hardware factors.
12+ This finds it by creating many timestamps in a row and computing their common
1313denominator.
1414
1515# Example
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import { getDefaultTimes } from './default.js'
33// Retrieve system's time resolution in nanoseconds.
44// If the resolution is <1ns, returns 1ns.
55// Time resolution depends on a combination of hardware and software factors.
6+ // An array of `times` can be passed
7+ // - This is only necessary when computing the time resolution of another
8+ // process that is either on a different machine or using a different
9+ // runtime
10+ // - Since this is an edge case, this is left undocumented
611export default function timeResolution ( times = getDefaultTimes ( ) ) {
712 const currentResolution = POSSIBLE_RESOLUTIONS . find ( ( resolution ) =>
813 isTimeResolution ( resolution , times ) ,
You can’t perform that action at this time.
0 commit comments