NewContext creates a new context with the timer included
(ctx context.Context)
| 49 | |
| 50 | // NewContext creates a new context with the timer included |
| 51 | func (t *Timer) NewContext(ctx context.Context) context.Context { |
| 52 | return context.WithValue(ctx, "timer", t) |
| 53 | } |
| 54 | |
| 55 | // FromContext creates a new context with the timer included |
| 56 | func FromContext(ctx context.Context) *Timer { |