Add records a time pivot.
(name string)
| 40 | |
| 41 | // Add records a time pivot. |
| 42 | func (t *Timer) Add(name string) { |
| 43 | t.Lock() |
| 44 | defer t.Unlock() |
| 45 | |
| 46 | t.names = append(t.names, name) |
| 47 | t.pivots = append(t.pivots, time.Now()) |
| 48 | } |
| 49 | |
| 50 | // ToLogFields returns analysis results as log fields. |
| 51 | func (t *Timer) ToLogFields() log.Fields { |
no outgoing calls