Periodically check and update of time
()
| 68 | |
| 69 | // Periodically check and update of time |
| 70 | func (timer *cachedTimer) update() { |
| 71 | for { |
| 72 | select { |
| 73 | case <-timer.done: |
| 74 | return |
| 75 | case <-timer.ticker.C: |
| 76 | atomic.StoreUint32(&timer.now, getUnixTime()) |
| 77 | } |
| 78 | } |
| 79 | } |
no test coverage detected