Skip to content

Instantly share code, notes, and snippets.

@sayden
Created August 17, 2018 21:12
Show Gist options
  • Save sayden/41cc784ea600f2f742cf9b27024d70ea to your computer and use it in GitHub Desktop.
Save sayden/41cc784ea600f2f742cf9b27024d70ea to your computer and use it in GitHub Desktop.
timer test
package time_profile
import "testing"
func Benchmark_NewTimer(b *testing.B) {
ch := newTimer()
for n := 0; n < b.N; n++ {
ch <- struct{}{}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment