Standard library / testing
testing.B.StartTimer()
Resume timing after a pause; calling it while running has no effect. Expected stdout: 'true\nPASS\n'. Run as a _test.go file using the Go test harness.
Formal Syntax & Structure
go syntaxgo
func (b *B) StartTimer()Working Example
Example Snippetgo
package main
import ( "fmt" "testing")
func TestReference(t *testing.T) { r := testing.Benchmark(func(b *testing.B) { b.StopTimer() b.StartTimer() for j := 0; j < b.N; j++ { } }) fmt.Println(r.N > 0)}