()
| 182 | } |
| 183 | |
| 184 | func (w *testWatch) run() { |
| 185 | time.Sleep(w.firstDelay) |
| 186 | w.update() |
| 187 | for w.currentCalled < w.closeAfter { |
| 188 | time.Sleep(w.nextDelay) |
| 189 | w.update() |
| 190 | } |
| 191 | close(w.ch) |
| 192 | } |
| 193 | |
| 194 | func (w *testWatch) update() { |
| 195 | w.Lock() |