github.com/go-chrono/chrono@v0.0.0-20240102183611-532f0d0d7c34/test/instant.go (about) 1 // Package chronotest provides functionality useful for testing chrono. 2 // It should not be imported for normal usage of chrono. 3 // 4 package chronotest 5 6 import ( 7 _ "unsafe" // for go:linkname 8 9 "github.com/go-chrono/chrono" 10 ) 11 12 // InstantOf creates a new Instant with the supplied nanoseconds. 13 func InstantOf(t int64) chrono.Instant { 14 return instant(t) 15 } 16 17 //go:linkname instant github.com/go-chrono/chrono.instant 18 func instant(int64) chrono.Instant