Skip to content

Commit

Permalink
Merge pull request #2416 from adroitwhiz/no-relativetime
Browse files Browse the repository at this point in the history
Remove Timer.relativeTime
  • Loading branch information
cwillisf authored Oct 17, 2023
2 parents 83b9e67 + 83bcbb8 commit 15cdd2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
13 changes: 1 addition & 12 deletions src/util/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* ... pass some time ...
* var timeDifference = timer.timeElapsed();
* ---
* Or, you can use the `time` and `relativeTime`
* Or, you can use the `time` function
* to do some measurement yourself.
*/

Expand Down Expand Up @@ -68,17 +68,6 @@ class Timer {
return this.nowObj.now();
}

/**
* Returns a time accurate relative to other times produced by this function.
* If possible, will use sub-millisecond precision.
* If not, will use millisecond precision.
* Not guaranteed to produce the same absolute values per-system.
* @returns {number} ms-scale accurate time relative to other relative times.
*/
relativeTime () {
return this.nowObj.now();
}

/**
* Start a timer for measuring elapsed time,
* at the most accurate precision possible.
Expand Down
9 changes: 0 additions & 9 deletions test/fixtures/mock-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ class MockTimer {
return this._mockTime;
}

/**
* Returns a time accurate relative to other times produced by this function.
* @returns {number} ms-scale accurate time relative to other relative times.
* @memberof MockTimer
*/
relativeTime () {
return this._mockTime;
}

/**
* Start a timer for measuring elapsed time.
* @memberof MockTimer
Expand Down

0 comments on commit 15cdd2f

Please sign in to comment.