Source file src/crypto/internal/fips140deps/time/time.go

     1  // Copyright 2025 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !windows
     6  
     7  package time
     8  
     9  import (
    10  	_ "unsafe"
    11  )
    12  
    13  // HighPrecisionNow returns a high-resolution timestamp suitable for measuring
    14  // small time differences. It uses the time package's monotonic clock.
    15  //
    16  // Its unit, epoch, and resolution are unspecified, and may change, but can be
    17  // assumed to be sufficiently precise to measure time differences on the order
    18  // of tens to hundreds of nanoseconds.
    19  func HighPrecisionNow() int64 {
    20  	return monoTime()
    21  }
    22  
    23  //go:linkname monoTime
    24  func monoTime() int64
    25  

View as plain text