// ConvertTimeout provides backwards compatibility for values that used to be specified as integers,
// while also allowing them to be specified as durations.
971127
func ConvertTimeout(timeout string, defaultUnit time.Duration) time.Duration {
	if timeoutI, err := strconv.Atoi(timeout); err == nil {
		log.Warn("cassandra_store: specifying the timeout as integer is deprecated, please use a duration value")
		return time.Duration(timeoutI) * defaultUnit
	}
	timeoutD, err := time.ParseDuration(timeout)
	if err != nil {
		log.Fatalf("cassandra_store: invalid duration value %q", timeout)
	}
	return timeoutD
}
744507
func (s *HealthCheck) SetTimeout(v int64) *HealthCheck {
	s.Timeout = &v
	return s
}
139662
func (p *Plugin) SetTimeout(t time.Duration) {
	p.mu.Lock()
	p.timeout = t
	p.mu.Unlock()
}
930383
func StopTimeout(v time.Duration) Option {
	return optionFunc(func(app *App) {
		app.stopTimeout = v
	})
}
1331711
func Timeout(timeout time.Duration) Option {
	return func(g *Generator) {
		g.Timeout = timeout
	}
}
1203223
func ConvertStringToTimeDuration(input string) (time.Duration, error) {
	output, err := strconv.Atoi(input)
	return time.Duration(output), err
}
1252794
func (s *DeleteMappingService) MasterTimeout(masterTimeout string) *DeleteMappingService {
	s.masterTimeout = masterTimeout
	return s
}
151686
func (ri *ReindexRemoteInfo) SocketTimeout(timeout string) *ReindexRemoteInfo {
	ri.socketTimeout = timeout
	return ri
}
1346319
func (s *Job) SetTimeout(v int64) *Job {
	s.Timeout = &v
	return s
}
945346
func (s *ConnectionDraining) SetTimeout(v int64) *ConnectionDraining {
	s.Timeout = &v
	return s
}
460533
func (s *PutMappingService) Timeout(timeout string) *PutMappingService {
	s.timeout = timeout
	return s
}
227926
func StopTimeout(timeout time.Duration) Option {
	return func(o *Options) {
		o.StopTimeout = timeout
	}
}
1240649
func (t Time) Convert(sc *stmtctx.StatementContext, tp uint8) (Time, error) {
	if t.Type == tp || t.IsZero() {
		return Time{Time: t.Time, Type: tp, Fsp: t.Fsp}, nil
	}

	t1 := Time{Time: t.Time, Type: tp, Fsp: t.Fsp}
	err := t1.check(sc)
	return t1, errors.Trace(err)
}
278715
func (self *HttpClient) SetTimeout(t time.Duration) {
	self.client.Timeout = t
}
8463
func (s *DeleteByQueryService) Timeout(timeout string) *DeleteByQueryService {
	s.timeout = timeout
	return s
}
943615
func (a *EvaluateOnCallFrameArgs) SetTimeout(timeout runtime.TimeDelta) *EvaluateOnCallFrameArgs {
	a.Timeout = &timeout
	return a
}
361477
func (s *CloseIndexService) Timeout(timeout string) *CloseIndexService {
	s.timeout = timeout
	return s
}