github.com/go-playground/pkg/v5@v5.29.1/time/nanotime.go (about)

     1  //go:build go1.18
     2  // +build go1.18
     3  
     4  package timeext
     5  
     6  import (
     7  	_ "unsafe"
     8  )
     9  
    10  //go:noescape
    11  //go:linkname nanotime runtime.nanotime
    12  func nanotime() int64
    13  
    14  // NanoTime returns the time from the monotonic clock in nanoseconds.
    15  func NanoTime() int64 {
    16  	return nanotime()
    17  }