(t *time.Timer)
| 17 | } |
| 18 | |
| 19 | func stopTimer(t *time.Timer) { |
| 20 | if !t.Stop() { |
| 21 | // Collect possibly added time from the channel |
| 22 | // if timer has been stopped and nobody collected its value. |
| 23 | select { |
| 24 | case <-t.C: |
| 25 | default: |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // AcquireTimer returns a time.Timer from the pool and updates it to |
| 31 | // send the current time on its channel after at least timeout. |
no test coverage detected
searching dependent graphs…