aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_windows_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_windows_test.go')
-rw-r--r--src/testing/testing_windows_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testing/testing_windows_test.go b/src/testing/testing_windows_test.go
new file mode 100644
index 0000000000..e75232dede
--- /dev/null
+++ b/src/testing/testing_windows_test.go
@@ -0,0 +1,25 @@
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package testing_test
+
+import (
+ "testing"
+ "time"
+)
+
+var sink time.Time
+var sinkHPT testing.HighPrecisionTime
+
+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()
+ }
+}