File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88
9+ ## [ 5.30.0] - 2024-06-01
10+ ### Changed
11+ - Changed NanoTome to not use linkname due to Go1.23 upcoming breaking changes.
12+
913## [ 5.29.1] - 2024-04-04
1014### Fixed
1115- Added HTTP 404 to non retryable status codes.
@@ -132,7 +136,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
132136### Added
133137- Added ` timext.NanoTime ` for fast low level monotonic time with nanosecond precision.
134138
135- [ Unreleased ] : https://github.com/go-playground/pkg/compare/v5.29.1...HEAD
139+ [ Unreleased ] : https://github.com/go-playground/pkg/compare/v5.30.0...HEAD
140+ [ 5.30.0 ] : https://github.com/go-playground/pkg/compare/v5.29.1..v5.30.0
136141[ 5.29.1 ] : https://github.com/go-playground/pkg/compare/v5.29.0..v5.29.1
137142[ 5.29.0 ] : https://github.com/go-playground/pkg/compare/v5.28.1..v5.29.0
138143[ 5.28.1 ] : https://github.com/go-playground/pkg/compare/v5.28.0..v5.28.1
Original file line number Diff line number Diff line change 11# pkg
22
3- ![ Project status] ( https://img.shields.io/badge/version-5.29.1 -green.svg )
3+ ![ Project status] ( https://img.shields.io/badge/version-5.30.0 -green.svg )
44[ ![ Lint & Test] ( https://github.com/go-playground/pkg/actions/workflows/go.yml/badge.svg )] ( https://github.com/go-playground/pkg/actions/workflows/go.yml )
55[ ![ Coverage Status] ( https://coveralls.io/repos/github/go-playground/pkg/badge.svg?branch=master )] ( https://coveralls.io/github/go-playground/pkg?branch=master )
66[ ![ GoDoc] ( https://godoc.org/github.com/go-playground/pkg?status.svg )] ( https://pkg.go.dev/mod/github.com/go-playground/pkg/v5 )
Original file line number Diff line number Diff line change 44package timeext
55
66import (
7- _ "unsafe "
7+ "time "
88)
99
10- //go:noescape
11- //go:linkname nanotime runtime.nanotime
12- func nanotime () int64
10+ var base = time .Now ()
1311
14- // NanoTime returns the time from the monotonic clock in nanoseconds.
12+ // NanoTime returns a monotonically increasing time in nanoseconds.
1513func NanoTime () int64 {
16- return nanotime ( )
14+ return int64 ( time . Since ( base ) )
1715}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ func TestNanoTime(t *testing.T) {
1919
2020func BenchmarkNanoTime (b * testing.B ) {
2121 for i := 0 ; i < b .N ; i ++ {
22- _ = nanotime ()
22+ _ = NanoTime ()
2323 }
2424}
2525
You can’t perform that action at this time.
0 commit comments