// AsTime implements Defaulter.
965763
func (d *defaulter) AsTime(v Valuer, layout string, dv time.Time) time.Time {
	value, err := v.Value()
	if err != nil {
		d.logValuerError(err)
		return dv
	}
	tvalue, err := time.Parse(layout, value)
	if err != nil {
		d.logFormatError("time", err)
		return dv
	}
	return tvalue
}
33573
func Time(v time.Time) *time.Time {
	p := new(time.Time)
	*p = v
	return p
}
766632
func (fi *linuxExFileInfo) ATime() time.Time {
	return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
}
89992
func (vr *VoiceResponse) EndTimeAsTime() (time.Time, error) {
	return time.Parse(time.RFC1123Z, vr.EndTime)
}
849441
func (n NamespacedKV) Time(key string) (time.Time, bool) {
	var t time.Time
	valBs, err := n.db.Get(n.prefixedKey(key), nil)
	if err != nil {
		return t, false
	}
	err = t.UnmarshalBinary(valBs)
	return t, err == nil
}
1280408
func (me *DefaultAdapter) LiteralTime(buf *SqlBuilder, t time.Time) error {
	if buf.IsPrepared {
		return me.PlaceHolderSql(buf, t)
	}
	return me.Literal(buf, t.UTC().Format(me.TimeFormat))
}
1315495
func (id *ULID) SetTime(ms uint64) error {
	if ms > maxTime {
		return ErrBigTime
	}

	(*id)[0] = byte(ms >> 40)
	(*id)[1] = byte(ms >> 32)
	(*id)[2] = byte(ms >> 24)
	(*id)[3] = byte(ms >> 16)
	(*id)[4] = byte(ms >> 8)
	(*id)[5] = byte(ms)

	return nil
}
1159915
func (d Duration) Time(unit Duration, bpm int) time.Duration {
	val := (60.0 / float64(bpm)) / (float64(d.Value) / 4.0) / (float64(unit.Value) / 4.0)

	for i := 0; i < d.Dots; i++ {
		val += val / 2.0
	}

	if d.Triplet {
		val = val / 3.0
	}

	return time.Duration(val * ns)
}
1088036
func (fi *darwinExFileInfo) ATime() time.Time {
	return timespecToTime(fi.Sys().(*syscall.Stat_t).Atimespec)
}
402501
func (t *Timer) Time(f func()) {
	s := time.Now()
	f()
	t.UpdateSince(s)
}
1237139
func TimeWithDefault(val *time.Time, defaultValue time.Time) time.Time {
	if val == nil {
		return defaultValue
	}
	return *val
}
548808
func HandlerAscTime(entry *logrus.Entry, formatter *CustomFormatter) (interface{}, error) {
	return entry.Time.Format(formatter.TimestampFormat), nil
}
1135289
func (e *etc) ValueAsDuration(path string, dv time.Duration) time.Duration {
	value := e.valueAt(path)
	return defaulter.AsDuration(value, dv)
}
1045190
func interpolationFuncTimestamp() ast.Function {
	return ast.Function{
		ArgTypes:   []ast.Type{},
		ReturnType: ast.TypeString,
		Callback: func(args []interface{}) (interface{}, error) {
			return time.Now().UTC().Format(time.RFC3339), nil
		},
	}
}
810510
func (c Context) Time(key string, t time.Time) Context {
	c.l.context = enc.AppendTime(enc.AppendKey(c.l.context, key), t, TimeFieldFormat)
	return c
}
936980
func (ts TimeStamp) AsTime() (tm time.Time) {
	tm = time.Unix(int64(ts), 0).Local()
	return
}
1096933
func (g *Generator) Time(loc *time.Location, base time.Time, dur time.Duration) time.Time {
	base = base.UTC()
	return base.Add(g.Duration(0, dur)).In(loc)
}