Skip to content

Commit

Permalink
Fixes description for setToCurrentTime to seconds instead of millisec…
Browse files Browse the repository at this point in the history
…onds (#585)
  • Loading branch information
alarobric committed Sep 10, 2023
1 parent 611e228 commit 07e9a3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
avoid an unnecessarily complex regex.
- Cleanup code and refactor to be more efficient
- Correct TS types for working with OpenMetrics
- Updated Typescript and Readme docs for `setToCurrentTime()` to reflect units as seconds.

### Added

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ functions will not have the correct value for `this`.
##### Utility Functions

```js
// Set value to current time:
// Set value to current time in seconds:
gauge.setToCurrentTime();

// Record durations:
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export class Gauge<T extends string = string> {
get(): Promise<MetricObjectWithValues<MetricValue<T>>>;

/**
* Set gauge value to current epoch time in ms
* Set gauge value to current epoch time in seconds
* @param labels Object with label keys and values
*/
setToCurrentTime(labels?: LabelValues<T>): void;
Expand Down

0 comments on commit 07e9a3c

Please sign in to comment.