[ trixie ]
[ sid ]
[ ソース: golang-github-bep-clocks ]
パッケージ: golang-github-bep-clocks-dev (0.5.0-2)
golang-github-bep-clocks-dev に関するリンク
Debian の資源:
golang-github-bep-clocks ソースパッケージをダウンロード:
- [golang-github-bep-clocks_0.5.0-2.dsc]
- [golang-github-bep-clocks_0.5.0.orig.tar.gz]
- [golang-github-bep-clocks_0.5.0-2.debian.tar.xz]
メンテナ:
外部の資源:
- ホームページ [github.com]
類似のパッケージ:
- golang-github-facebookgo-clock-dev
- golang-github-bep-lazycache-dev
- golang-github-arceliar-phony-dev
- golang-github-dkolbly-wl-dev
- golang-gopkg-go-playground-validator.v8-dev
- golang-github-hexops-gotextdiff-dev
- golang-github-blackfireio-osinfo-dev
- golang-github-dnephin-cobra-dev
- golang-github-azure-go-autorest-dev
- golang-github-benbjohnson-immutable-dev
- golang-github-backblaze-blazer-dev
Golang clock that allows you to set the start time (Go library)
This package provides a *ticking clock* that allows you to set the start time. It also provides a system clock, both implementing this interface:
// Clock provides a subset of methods in time.Time type Clock interface { Now() time.Time Since(t time.Time) time.Duration Until(t time.Time) time.Duration
// Offset returns the offset of this clock relative to the system clock Offset() time.Duration }
Note that this only support a subset of all the methods in time.Time (see above) and is by design very simple. For a more advanced time mocking library, have a look at <https://github.com/benbjohnson/clock>.