Blazing Fast Time Library for golang with zero allocs
Go 1.8
go get github.com/kpango/fastime
now := fastime.Now()
defer fastime.Stop()
// Create Instance
ft := fastime.New()
defer ft.Stop()
ft.Now()
go test -count=5 -run=NONE -bench . -benchmem
goos: darwin
goarch: amd64
pkg: github.com/kpango/fastime
BenchmarkFastime-8 2000000000 0.47 ns/op 0 B/op 0 allocs/op
BenchmarkFastime-8 2000000000 0.48 ns/op 0 B/op 0 allocs/op
BenchmarkFastime-8 2000000000 0.48 ns/op 0 B/op 0 allocs/op
BenchmarkFastime-8 2000000000 0.47 ns/op 0 B/op 0 allocs/op
BenchmarkFastime-8 2000000000 0.47 ns/op 0 B/op 0 allocs/op
BenchmarkTime-8 100000000 16.6 ns/op 1 B/op 0 allocs/op
BenchmarkTime-8 100000000 15.4 ns/op 1 B/op 0 allocs/op
BenchmarkTime-8 100000000 15.6 ns/op 1 B/op 0 allocs/op
BenchmarkTime-8 100000000 15.6 ns/op 1 B/op 0 allocs/op
BenchmarkTime-8 100000000 14.9 ns/op 1 B/op 0 allocs/op
PASS
ok github.com/kpango/fastime 12.936s
- Fork it ( https://github.com/kpango/fastime/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
fastime released under MIT license, refer LICENSE file.