https://github.com/temoto/atomic_clock
Atomic operations on monotonic clock for your time measurements in Go.
https://github.com/temoto/atomic_clock
golang monotonic production-ready time-accounting
Last synced: 7 months ago
JSON representation
Atomic operations on monotonic clock for your time measurements in Go.
- Host: GitHub
- URL: https://github.com/temoto/atomic_clock
- Owner: temoto
- License: cc0-1.0
- Created: 2020-03-13T17:23:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-13T18:50:22.000Z (over 5 years ago)
- Last Synced: 2025-01-28T21:24:04.170Z (8 months ago)
- Topics: golang, monotonic, production-ready, time-accounting
- Language: Go
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# What
atomic_clock is convenient API around atomic int64 of monotonic clock.
Use for time accounting. Do not use where actual time value matters.# Usage
[Documentation](https://pkg.go.dev/github.com/temoto/atomic_clock)
Key takeaways:
* `go get github.com/temoto/atomic_clock`
* Zero value of `atomic_clock.Clock{}` is usable.
* Content is single int64 offset in nanoseconds from undefined epoch. Clock source is `time.Since(epoch)` which is monotonic since Go 1.9.# Flair
[](https://travis-ci.org/temoto/atomic_clock)
[](https://codecov.io/gh/temoto/atomic_clock)
[](https://goreportcard.com/report/github.com/temoto/atomic_clock)