Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/f2prateek/clock
https://github.com/f2prateek/clock
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/f2prateek/clock
- Owner: f2prateek
- Created: 2016-01-26T09:38:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-14T00:40:07.000Z (almost 9 years ago)
- Last Synced: 2024-06-20T10:14:41.750Z (5 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clock
A clock abstraction providing access to the current time.
It's primary purpose is to allow alternate clocks to be plugged in for tests.3 implementations are provided out of the box:
1. `Default`: Provides the current local time.
2. `Fixed`: Always provides a fixed time.
3. `Offset`: Provides the time from a different clock with the specified duration added.
4. `In`/`DefaultIn`: Provides the time from a given clock/default clock in the given time zone.