// RegisterTask registers a task to be periodically run at the given interval.
RegisterTask registers a task to be periodically run at the given interval.
// RegisterTask registers a task to be periodically run at the given interval .
func (s *Manager) RegisterTask(id string, interval time.Duration, task func()) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.tasks[id] = &registration{
		handle:   task,
		id:       id,
		interval: interval,
	}
}
func ( s * Manager ) RegisterTask ( id string , interval time . Duration , task func ( ) ) { s . mutex . Lock ( ) defer s . mutex . Unlock ( ) s . tasks [ id ] = & registration { handle : task , id : id , interval : interval , } }
RegisterTask registers a task to be periodically run at the given interval.
RegisterTask registers a task to be periodically run at the given interval .