mirror of
https://github.com/go-kit/kit.git
synced 2025-07-17 01:12:38 +02:00
Changes as per code review
This commit is contained in:
@ -29,7 +29,8 @@ func (t *Timer) ObserveDuration() {
|
|||||||
t.h.Observe(d)
|
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) {
|
func (t *Timer) Unit(u time.Duration) {
|
||||||
t.u = u
|
t.u = u
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ func TestTimerSlow(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestTimerUnit(t *testing.T) {
|
func TestTimerUnit(t *testing.T) {
|
||||||
|
|
||||||
for _, tc := range []struct {
|
for _, tc := range []struct {
|
||||||
name string
|
name string
|
||||||
unit time.Duration
|
unit time.Duration
|
||||||
|
Reference in New Issue
Block a user