gitee.com/quant1x/gox@v1.21.2/timestamp/now_darwin.go (about) 1 package timestamp 2 3 import ( 4 _ "unsafe" // for go:linkname 5 ) 6 7 //go:linkname walltime runtime.walltime 8 func walltime() (int64, int32) 9 10 func v2Now() int64 { 11 sec, nsec := walltime() 12 sec += int64(offsetInSecondsEastOfUTC) 13 milli := sec*MillisecondsPerSecond + int64(nsec)/1e6%MillisecondsPerSecond 14 return milli 15 }