Source file src/crypto/internal/fips140deps/time/time_windows.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 package time 6 7 import "internal/syscall/windows" 8 9 // HighPrecisionNow returns a high-resolution timestamp suitable for measuring 10 // small time differences. It uses Windows' QueryPerformanceCounter. 11 // 12 // Its unit, epoch, and resolution are unspecified, and may change, but can be 13 // assumed to be sufficiently precise to measure time differences on the order 14 // of tens to hundreds of nanoseconds. 15 func HighPrecisionNow() int64 { 16 return windows.QueryPerformanceCounter() 17 } 18