Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Nov 20, 2022
1 parent 8ffbde9 commit 9835ddf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

Find the process's time resolution.

The time resolution is a combination of both software and hardware factors. This
finds it by creating many timestamps in a row and computing it their common
The time resolution is a combination of multiple software and hardware factors.
This finds it by creating many timestamps in a row and computing their common
denominator.

# Example
Expand Down
5 changes: 5 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { getDefaultTimes } from './default.js'
// Retrieve system's time resolution in nanoseconds.
// If the resolution is <1ns, returns 1ns.
// Time resolution depends on a combination of hardware and software factors.
// An array of `times` can be passed
// - This is only necessary when computing the time resolution of another
// process that is either on a different machine or using a different
// runtime
// - Since this is an edge case, this is left undocumented
export default function timeResolution(times = getDefaultTimes()) {
const currentResolution = POSSIBLE_RESOLUTIONS.find((resolution) =>
isTimeResolution(resolution, times),
Expand Down

0 comments on commit 9835ddf

Please sign in to comment.