(n int)
| 29 | } |
| 30 | |
| 31 | func (counter *counter) add(n int) int { |
| 32 | counter.mutex.Lock() |
| 33 | defer counter.mutex.Unlock() |
| 34 | |
| 35 | if counter.duration > 0 { |
| 36 | counter.zeroTimer.Stop() |
| 37 | } |
| 38 | counter.wg.Add(n) |
| 39 | counter.connections += n |
| 40 | |
| 41 | return counter.connections |
| 42 | } |
| 43 | |
| 44 | func (counter *counter) done() int { |
| 45 | counter.mutex.Lock() |
no test coverage detected