// AddYears adds a year to the current time.
// Positive values travel forward while negative values travel into the past
350957
func (c *Carbon) AddYears(y int) *Carbon {
	return NewCarbon(c.AddDate(y, 0, 0))
}
336212
func (ep *EnumParser) AddVals(vals map[string]interface{}) {
	if ep.vals == nil {
		ep.vals = make(map[string]interface{})
	}
	for k, v := range vals {
		if ep.Type == "" {
			ep.Type = reflect.TypeOf(v).Name()
		}
		if !ep.CaseMatch {
			k = strings.ToLower(k)
		}
		ep.vals[k] = v
	}
}
1138669
func (t *Timings) Add(name string, elapsed time.Duration) {
	t.mu.Lock()
	defer t.mu.Unlock()

	hist, ok := t.histograms[name]
	if !ok {
		hist = NewGenericHistogram("", bucketCutoffs, bucketLabels, "Count", "Time")
		t.histograms[name] = hist
	}
	elapsedNs := int64(elapsed)
	hist.Add(elapsedNs)
	t.totalCount++
	t.totalTime += elapsedNs
}
363939
func (c Counter) Add(delta float64) {
	for _, counter := range c {
		counter.Add(delta)
	}
}
1150156
public static <D extends Comparable> DateTimeExpression<D> addYears(DateTimeExpression<D> date, int years) {
        return Expressions.dateTimeOperation(date.getType(), Ops.DateTimeOps.ADD_YEARS, date, ConstantImpl.create(years));
    }
900117
func (t *Time) Add(sc *stmtctx.StatementContext, d Duration) (Time, error) {
	sign, hh, mm, ss, micro := splitDuration(d.Duration)
	seconds, microseconds, _ := calcTimeDiff(t.Time, FromDate(0, 0, 0, hh, mm, ss, micro), -sign)
	days := seconds / secondsIn24Hour
	year, month, day := getDateFromDaynr(uint(days))
	var tm MysqlTime
	tm.year, tm.month, tm.day = uint16(year), uint8(month), uint8(day)
	calcTimeFromSec(&tm, seconds%secondsIn24Hour, microseconds)
	if t.Type == mysql.TypeDate {
		tm.hour = 0
		tm.minute = 0
		tm.second = 0
		tm.microsecond = 0
	}
	fsp := t.Fsp
	if d.Fsp > fsp {
		fsp = d.Fsp
	}
	ret := Time{
		Time: tm,
		Type: t.Type,
		Fsp:  fsp,
	}
	return ret, ret.Check(sc)
}
797038
func (a *accounter) Add(n int64) int64 {
	return atomic.AddInt64(&a.current, n)
}
789450
func (em *EventManager) AddEvents(ems ...EventSubs) {
	for _, eo := range ems {
		em.AddEvent(eo)
	}
}
300593
func (s Session) AddTimeZones(zones ...TimeZone) Session {
	v := make([]byte, 0, 512)
	for i, zone := range zones {
		v = zone.append(v)
		if i != len(zones)-1 {
			v = appendSpace(v)
		}
	}
	return s.append(TypeTimeZones, v)
}
392837
func (mt *MultiTimings) Add(names []string, elapsed time.Duration) {
	if len(names) != len(mt.labels) {
		panic("MultiTimings: wrong number of values in Add")
	}
	mt.Timings.Add(safeJoinLabels(names), elapsed)
}
1086050
func (s *stringSet) Add(vs ...string) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}
1181841
func YearInList(t time.Time, years []int) bool {
	for _, year := range years {
		if t.Year() == year {
			return true
		}
	}

	return false
}
374406
func (connector *Forwarder) AddSpans(ctx context.Context, spans []*trace.Span) error {
	atomic.AddInt64(&connector.stats.pipeline, int64(len(spans)))
	defer atomic.AddInt64(&connector.stats.pipeline, -int64(len(spans)))
	atomic.AddInt64(&connector.stats.totalSpansForwarded, int64(len(spans)))
	// could filter here
	if len(spans) == 0 {
		return nil
	}
	return connector.sampler.AddSpans(ctx, spans, connector.sink)
}
332716
func (versions *Versions) AddVersion(version *Version) {
	if version.PropertyVersion != 0 {
		for key, v := range versions.Versions.Items {
			if v.PropertyVersion == version.PropertyVersion {
				versions.Versions.Items[key] = version
				return
			}
		}
	}

	versions.Versions.Items = append(versions.Versions.Items, version)
}
593420
func (c *Carbon) AddWeeks(w int) *Carbon {
	return NewCarbon(c.AddDate(0, 0, daysPerWeek*w))
}
505118
func (d *Duration) Add(n time.Duration) time.Duration {
	return time.Duration(d.v.Add(int64(n)))
}
1168770
func (t *TimeCounter) Add(dur time.Duration) {
	if dur.Nanoseconds() <= atomic.LoadInt64(&t.NsBarrier) {
		atomic.AddInt64(&t.Below, 1)
		return
	}
	atomic.AddInt64(&t.Above, 1)
}