func (t *StandardTimer) Percentile(p float64) float64 {
	return t.histogram.Percentile(p)
}
Percentile returns an arbitrary percentile of the values in the sample.
package metrics
import (
	"sync"
	"time"
)
type Timer interface {
	Count() int64
	Max() int64
	Mean() float64
	Min() int64
	Percentile(float64) float64
	Percentiles([]float64) []float64
	Rate1() float64
	Rate5() float64
	Rate15() float64
	RateMean() float64
	Snapshot() Timer
	StdDev() float64
	Stop()
	Sum() int64
	Time(func())
	Update(time.Duration)
	UpdateSince(time.Time)
	Variance() float64
}
func GetOrRegisterTimer(name string, r Registry) Timer {
	if nil == r {
		r = DefaultRegistry
	}
	return r.GetOrRegister(name, NewTimer).(Timer)
}
func NewCustomTimer(h Histogram, m Meter) Timer {
	if UseNilMetrics {
		return NilTimer{}
	}
	return &StandardTimer{
		histogram: h,
		meter:     m,
	}
}
func NewRegisteredTimer(name string, r Registry) Timer {
	c := NewTimer()
	if nil == r {
		r = DefaultRegistry
	}
	r.Register(name, c)
	return c
}
func NewTimer() Timer {
	if UseNilMetrics {
		return NilTimer{}
	}
	return &StandardTimer{
		histogram: NewHistogram(NewExpDecaySample(1028, 0.015)),
		meter:     NewMeter(),
	}
}
type NilTimer struct {
	h Histogram
	m Meter
}
func (NilTimer) Count() int64 { return 0 }
func (NilTimer) Max() int64 { return 0 }
func (NilTimer) Mean() float64 { return 0.0 }
func (NilTimer) Min() int64 { return 0 }
func (NilTimer) Percentile(p float64) float64 { return 0.0 }
func (NilTimer) Percentiles(ps []float64) []float64 {
	return make([]float64, len(ps))
}
func (NilTimer) Rate1() float64 { return 0.0 }
func (NilTimer) Rate5() float64 { return 0.0 }
func (NilTimer) Rate15() float64 { return 0.0 }
func (NilTimer) RateMean() float64 { return 0.0 }
func (NilTimer) Snapshot() Timer { return NilTimer{} }
func (NilTimer) StdDev() float64 { return 0.0 }
func (NilTimer) Stop() {}
func (NilTimer) Sum() int64 { return 0 }
func (NilTimer) Time(func()) {}
func (NilTimer) Update(time.Duration) {}
func (NilTimer) UpdateSince(time.Time) {}
func (NilTimer) Variance() float64 { return 0.0 }
type StandardTimer struct {
	histogram Histogram
	meter     Meter
	mutex     sync.Mutex
}
func (t *StandardTimer) Count() int64 {
	return t.histogram.Count()
}
func (t *StandardTimer) Max() int64 {
	return t.histogram.Max()
}
func (t *StandardTimer) Mean() float64 {
	return t.histogram.Mean()
}
func (t *StandardTimer) Min() int64 {
	return t.histogram.Min()
}