func (b *B) resetTimer() {
	if b.timerOn {
		runtime.ReadMemStats(&memStats)
		b.startAllocs = memStats.Mallocs
		b.startBytes = memStats.TotalAlloc
		b.start = time.Now()
	}
	b.duration = 0
	b.netAllocs = 0
	b.netBytes = 0
}
ResetTimer sets the elapsed benchmark time to zero.
It does not affect whether the timer is running.
package nitro
import (
	"flag"
	"fmt"
	"os"
	"runtime"
	"time"
)
var memStats runtime.MemStats
var AnalysisOn = false
type B struct {
	initialTime time.Time  
	start       time.Time  
	duration    time.Duration
	timerOn     bool
	result      R
	startAllocs uint64
	startBytes  uint64
	netAllocs uint64
	netBytes  uint64
}
func (b *B) startTimer() {
	if b == nil {
		fmt.Println("ERROR: can't call startTimer on a nil value")
		os.Exit(-1)
	}
	if !b.timerOn {
		runtime.ReadMemStats(&memStats)
		b.startAllocs = memStats.Mallocs
		b.startBytes = memStats.TotalAlloc
		b.start = time.Now()
		b.timerOn = true
	}
}
func (b *B) stopTimer() {
	if b == nil {
		fmt.Println("ERROR: can't call stopTimer on a nil value")
		os.Exit(-1)
	}
	if b.timerOn {
		b.duration += time.Since(b.start)
		runtime.ReadMemStats(&memStats)
		b.netAllocs += memStats.Mallocs - b.startAllocs
		b.netBytes += memStats.TotalAlloc - b.startBytes
		b.timerOn = false
	}
}