Initialize initializes the timer manager. It is normally used when the TimerManager is embedded in another type.
()
| 37 | // Initialize initializes the timer manager. |
| 38 | // It is normally used when the TimerManager is embedded in another type. |
| 39 | func (tm *TimerManager) Initialize() { |
| 40 | |
| 41 | tm.nextID = 1 |
| 42 | tm.timers = make([]timeout, 0) |
| 43 | } |
| 44 | |
| 45 | // SetTimeout sets a timeout with the specified duration and callback |
| 46 | // The function returns the timeout id which can be used to cancel the timeout |
no outgoing calls
no test coverage detected