Skip to content

Commit d247775

Browse files
authored
Merge pull request #23 from jadiunr/fix-timestamp-precision
Fix Timestamp precision from second to millisecond
2 parents c06ba5a + 3925d19 commit d247775

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Versioning](http://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
99

10+
### Fixed
11+
- Timestamp precision from second to millisecond
12+
1013
## [0.5.0] - 2021-10-18
1114

1215
### Added

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func executeCheck(event *types.Event) (int, error) {
226226
warnings int
227227
)
228228

229-
timeNow := time.Now().Unix()
229+
timeNow := time.Now().UnixNano() / 1000000
230230
parts, err := disk.Partitions(plugin.IncludePseudo)
231231
if err != nil {
232232
return sensu.CheckStateCritical, fmt.Errorf("Failed to get partitions, error: %v", err)

0 commit comments

Comments
 (0)