github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/time/monotonic/now.go (about)

     1  /* For license and copyright information please see the LEGAL file in the code repository */
     2  
     3  package monotonic
     4  
     5  import (
     6  	_ "unsafe" // for go:linkname
     7  )
     8  
     9  // now returns the current value of the runtime monotonic clock in nanoseconds.
    10  // It isn't not wall clock, Use in tasks like timeout, ...
    11  // TODO::: move assembly logic from go/src/runtime to this package to prevent use unsafe package
    12  //
    13  //go:linkname now runtime.nanotime
    14  func now() int64