code: func NewSyncIntervalTimer(interval time.Duration, f SyncFunc, onError OnErrorFunc) *SyncIntervalTimer {
  	var intervalTimer *time.Ticker
  	if interval > 0 {
  		intervalTimer = time.NewTicker(interval)
  	}
  	return &SyncIntervalTimer{
  		f: f, onError: onError,
  		intervalTimer: intervalTimer,
  		sync:          make(chan struct{}),
  		stop:          make(chan struct{}),
  	}
  }
docs: // NewSyncIntervalTimer creates a new SyncIntervalTimer with the given function and interval. onError can be nil.