// RegisterTask registers the given task to be run at the given interval.
RegisterTask registers the given task to be run at the given interval.
// RegisterTask registers the given task to be run at the given interval .
func (m *TaskManager) RegisterTask(_ string, interval time.Duration, run func()) {
	m.mutex.Lock()
	defer m.mutex.Unlock()
	m.tasks = append(m.tasks, &task{
		interval: interval,
		run:      run,
	})
}
func ( m * TaskManager ) RegisterTask ( _ string , interval time . Duration , run func ( ) ) { m . mutex . Lock ( ) defer m . mutex . Unlock ( ) m . tasks = append ( m . tasks , & task { interval : interval , run : run , } ) }
RegisterTask registers the given task to be run at the given interval.
RegisterTask registers the given task to be run at the given interval .