github.com/go-chrono/chrono@v0.0.0-20240102183611-532f0d0d7c34/unsafe.go (about) 1 package chrono 2 3 import ( 4 "sync" 5 "time" 6 _ "unsafe" // for go:linkname 7 ) 8 9 //go:linkname monotime runtime.nanotime 10 func monotime() int64 11 12 //go:linkname walltime runtime.walltime 13 func walltime() (secs int64, nsec int32) 14 15 //go:linkname zoneSources time.zoneSources 16 var zoneSources []string 17 18 //go:linkname embeddedTzData tzdata.zipdata 19 var embeddedTzData string 20 21 //go:linkname readEmbeddedTzData time.loadFromEmbeddedTZData 22 var readEmbeddedTzData func(zipName string) (string, error) 23 24 //go:linkname initLocal time.initLocal 25 func initLocal() 26 27 //go:linkname localLoc time.localLoc 28 var localLoc time.Location 29 30 //go:linkname localOnce time.localOnce 31 var localOnce sync.Once