- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for highPrecisionTimeNow (0.19 sec)
-
src/testing/export_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package testing var PrettyPrint = prettyPrint type HighPrecisionTime = highPrecisionTime
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 300 bytes - Viewed (0) -
src/testing/testing_windows.go
// // TODO: If Windows runtime implements high resolution timing then highPrecisionTime // can be removed. type highPrecisionTime struct { now int64 } // highPrecisionTimeNow returns high precision time for benchmarking. func highPrecisionTimeNow() highPrecisionTime { var t highPrecisionTime // This should always succeed for Windows XP and above. t.now = windows.QueryPerformanceCounter() return t }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 1.9K bytes - Viewed (0) -
src/testing/testing_other.go
} // highPrecisionTime represents a single point in time. // On all systems except Windows, using time.Time is fine. type highPrecisionTime struct { now time.Time } // highPrecisionTimeNow returns high precision time for benchmarking. func highPrecisionTimeNow() highPrecisionTime { return highPrecisionTime{now: time.Now()} } // highPrecisionTimeSince returns duration since b.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Apr 27 19:42:36 UTC 2024 - 876 bytes - Viewed (0) -
src/testing/testing_windows_test.go
func BenchmarkTimeNow(b *testing.B) { for i := 0; i < b.N; i++ { sink = time.Now() } } func BenchmarkHighPrecisionTimeNow(b *testing.B) { for i := 0; i < b.N; i++ { sinkHPT = testing.HighPrecisionTimeNow() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 490 bytes - Viewed (0)