code: func NewProgressEmitter(cfg config.Wrapper) *ProgressEmitter {
  	t := &ProgressEmitter{
  		stop:               make(chan struct{}),
  		registry:           make(map[string]map[string]*sharedPullerState),
  		timer:              time.NewTimer(time.Millisecond),
  		sentDownloadStates: make(map[protocol.DeviceID]*sentDownloadState),
  		connections:        make(map[protocol.DeviceID]protocol.Connection),
  		foldersByConns:     make(map[protocol.DeviceID][]string),
  		mut:                sync.NewMutex(),
  	}
  
  	t.CommitConfiguration(config.Configuration{}, cfg.RawCopy())
  	cfg.Subscribe(t)
  
  	return t
  }
docs: // NewProgressEmitter creates a new progress emitter which emits
  // DownloadProgress events every interval.