mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
watch
This commit is contained in:
@ -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()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user