Skip to content

Commit

Permalink
Update documentation for read(units)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonray authored Nov 18, 2023
2 parents 1179a6a + c9b098e commit 9256057
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ const stopwatch = new statman.Stopwatch();
- `start()` => starts the stopwatch, let the timing begin!

### read
- `read(precision)` => reads the stopwatch to determine how much time has elapsed. Note that the stopwatch continues to run. Returns the time elapsed in milliseconds. If `precision` is provided, `read()` will round to the number of decimals places based on precision.
- `read(precision, units)` => reads the stopwatch to determine how much time has elapsed. Note that the stopwatch continues to run. Returns the time elapsed in milliseconds.
- If `precision` is provided, `read()` will round to the number of decimals places based on precision.
- By default, `read` returns in `ms`. If `units` is specified to `s`, will return values in seconds.

- `time(precision)` => alias for `read()`

### stop, suspend
Expand Down

0 comments on commit 9256057

Please sign in to comment.