1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
This commit is contained in:
2022-06-02 15:39:35 +08:00
parent 1c27b29d27
commit 6811d45f22
2 changed files with 22 additions and 8 deletions

View File

@ -42,3 +42,13 @@ func TestStop(t *testing.T) {
t.Log(watch.Elapsed())
}
func BenchmarkNanotime(b *testing.B) {
b.RunParallel(func(p *testing.PB) {
watch := stopwatch.StartNew()
for p.Next() {
watch.ElapsedNanoseconds()
}
})
}