mirror of
https://github.com/go-kit/kit.git
synced 2025-07-15 01:04:44 +02:00
Changes as per code review
This commit is contained in:
@ -29,7 +29,8 @@ func (t *Timer) ObserveDuration() {
|
||||
t.h.Observe(d)
|
||||
}
|
||||
|
||||
// Unit sets the timer time unit
|
||||
// Unit sets the unit of the float64 emitted by the timer.
|
||||
// By default, the timer emits seconds.
|
||||
func (t *Timer) Unit(u time.Duration) {
|
||||
t.u = u
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ func TestTimerSlow(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTimerUnit(t *testing.T) {
|
||||
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
unit time.Duration
|
||||
|
Reference in New Issue
Block a user