Cached timer stores Unix time every second and returns the cached value
| 34 | |
| 35 | // Cached timer stores Unix time every second and returns the cached value |
| 36 | type cachedTimer struct { |
| 37 | now uint32 |
| 38 | ticker *time.Ticker |
| 39 | done chan bool |
| 40 | } |
| 41 | |
| 42 | // Create cached timer and start runtime timer that updates time every second |
| 43 | func NewCachedTimer() StoppableTimer { |
nothing calls this directly
no outgoing calls
no test coverage detected