github.com/go-eden/common@v0.1.15-0.20210617133546-059099253264/etime/cgo/now_test.go (about) 1 package cgo 2 3 import "testing" 4 5 func TestNow(t *testing.T) { 6 t.Log(Now()) 7 } 8 9 // BenchmarkNow-12 20000000 82.3 ns/op 0 B/op 0 allocs/op 10 func BenchmarkNow(b *testing.B) { 11 b.ResetTimer() 12 b.ReportAllocs() 13 for i := 0; i < b.N; i++ { 14 Now() 15 } 16 }