// NewFixedInterval creates and initializes a new fixed interval.
492845
func NewFixedInterval(delay time.Duration, etype events.Type, echan chan<- error) *FixedInterval {
	interval := new(FixedInterval)
	interval.Init(delay, etype, echan)
	return interval
}
658670
func FlushInterval(interval time.Duration) Option {
	return func(c *client) {
		c.flushInterval = interval
	}
}
533114
func (c *Client) SetDiscoveryInterval(interval time.Duration) error {
	c.Lock()
	if c.discoveryInterval != 0 {
		for i := 0; i < cap(c.quitChan); i++ {
			c.quitChan <- struct{}{}
		}
	}
	c.discoveryInterval = interval
	c.Unlock()
	common.Log.Infof("Starting discovery with interval %v", interval)
	return c.discover()
}
192599
func BreakerInterval(interval time.Duration) Option {
	return func(r *Rabbus) error {
		r.config.breaker.interval = interval
		return nil
	}
}
217825
func (_m *DBClient) UpdateInterval(interval models.Interval) error {
	ret := _m.Called(interval)

	var r0 error
	if rf, ok := ret.Get(0).(func(models.Interval) error); ok {
		r0 = rf(interval)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
1050868
func (c *Profiler) SetSamplingInterval(interval int) (*gcdmessage.ChromeResponse, error) {
	var v ProfilerSetSamplingIntervalParams
	v.Interval = interval
	return c.SetSamplingIntervalWithParams(&v)
}
161138
func (s *H264Settings) SetMinIInterval(v int64) *H264Settings {
	s.MinIInterval = &v
	return s
}
264641
func NewCarbonInterval(start, end *Carbon) (*CarbonInterval, error) {
	if start.Gte(end) {
		return nil, errors.New("The end date must be greater than the start date.")
	}

	return &CarbonInterval{
		Start: start,
		End: end,
	}, nil
}
197508
func NewFixed(vals ...graph.Value) *Fixed {
	it := &Fixed{
		uid:    NextUID(),
		values: make([]graph.Value, 0, 20),
	}
	for _, v := range vals {
		it.Add(v)
	}
	return it
}
494062
func (_m *DBClient) AddInterval(interval models.Interval) (string, error) {
	ret := _m.Called(interval)

	var r0 string
	if rf, ok := ret.Get(0).(func(models.Interval) string); ok {
		r0 = rf(interval)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(models.Interval) error); ok {
		r1 = rf(interval)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
56396
func (s *BusinessReportContentRange) SetInterval(v string) *BusinessReportContentRange {
	s.Interval = &v
	return s
}
71571
func (_m *SchedulerQueueClient) AddIntervalToQueue(interval models.Interval) error {
	ret := _m.Called(interval)

	var r0 error
	if rf, ok := ret.Get(0).(func(models.Interval) error); ok {
		r0 = rf(interval)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
1017084
func (s *CreateRule) SetIntervalUnit(v string) *CreateRule {
	s.IntervalUnit = &v
	return s
}
290518
func RegisterInterval(t time.Duration) Option {
	return func(o *Options) {
		o.RegisterInterval = t
	}
}
1345137
func (a *BeginFrameArgs) SetInterval(interval float64) *BeginFrameArgs {
	a.Interval = &interval
	return a
}
1292828
func WithRefreshInterval(refreshInterval time.Duration) ConfigOption {
	return func(o *configOption) {
		o.refreshInterval = refreshInterval
	}
}
1344065
func (c *Client) AddInterval(from contract.Interval) (id string, err error) {
	interval := models.NewInterval(from)
	if interval.ID != "" {
		_, err = uuid.Parse(interval.ID)
		if err != nil {
			return "", db.ErrInvalidObjectId
		}
	} else {
		interval.ID = uuid.New().String()
	}

	if interval.Timestamps.Created == 0 {
		ts := db.MakeTimestamp()
		interval.Timestamps.Created = ts
		interval.Timestamps.Modified = ts
	}

	data, err := json.Marshal(interval)
	if err != nil {
		return "", err
	}

	conn := c.Pool.Get()
	defer conn.Close()

	_ = conn.Send("MULTI")
	addObject(data, interval, interval.ID, conn)
	_, err = conn.Do("EXEC")

	return interval.ID, err
}