From 9835ddf63b9c2a2efbb8857deb3aeade65975d1c Mon Sep 17 00:00:00 2001 From: ehmicky Date: Sun, 20 Nov 2022 13:58:25 +0100 Subject: [PATCH] Add comment --- README.md | 4 ++-- src/main.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e9c5a8..458a3b9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/main.js b/src/main.js index cf88742..38d4f62 100644 --- a/src/main.js +++ b/src/main.js @@ -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),