code: func WriteJSON(r Registry, d time.Duration, w io.Writer) {
  	for range time.Tick(d) {
  		WriteJSONOnce(r, w)
  	}
  }
docs: // WriteJSON writes metrics from the given registry  periodically to the
  // specified io.Writer as JSON.