SetInterval sets a periodic timeout with the specified duration and callback The function returns the timeout id which can be used to cancel the timeout
(td time.Duration, arg interface{}, cb TimerCallback)
| 52 | // SetInterval sets a periodic timeout with the specified duration and callback |
| 53 | // The function returns the timeout id which can be used to cancel the timeout |
| 54 | func (tm *TimerManager) SetInterval(td time.Duration, arg interface{}, cb TimerCallback) int { |
| 55 | |
| 56 | return tm.setTimer(td, true, arg, cb) |
| 57 | } |
| 58 | |
| 59 | // ClearTimeout clears the timeout specified by the id. |
| 60 | // Returns true if the timeout is found. |