// ATime returns the LastAccessTime from Win32FileAttributeData.
9892
func (fi *winExFileInfo) ATime() time.Time {
	lastAccessTime := fi.Sys().(syscall.Win32FileAttributeData).LastAccessTime
	n := lastAccessTime.Nanoseconds()
	return time.Unix(0, n)
}
357948
func GetElapsedTime(o dhcp6.Options) (ElapsedTime, error) {
	v, err := o.GetOne(dhcp6.OptionElapsedTime)
	if err != nil {
		return 0, err
	}

	var t ElapsedTime
	err = (&t).UnmarshalBinary(v)
	return t, err
}
659793
func (r *Run) RequestedAtTime() (time.Time, error) {
	return time.Parse(time.RFC3339, r.RequestedAt)
}
375699
func FileModTime(path string) (time.Time, error) {
	info, err := os.Stat(path)
	if err != nil {
		return time.Time{}, err
	}
	return info.ModTime(), nil
}
595678
func (client *Client) ModifyInstanceAutoReleaseTime(instanceId, time string) error {
	args := ModifyInstanceAutoReleaseTimeArgs{
		InstanceId:      instanceId,
		AutoReleaseTime: time,
	}
	response := ModifyInstanceAutoReleaseTimeResponse{}
	err := client.Invoke("ModifyInstanceAutoReleaseTime", &args, &response)
	return err
}
802153
func (s *ResourceDataSyncItem) SetLastSyncTime(v time.Time) *ResourceDataSyncItem {
	s.LastSyncTime = &v
	return s
}
190361
func (s *TableInput) SetLastAccessTime(v time.Time) *TableInput {
	s.LastAccessTime = &v
	return s
}
790625
func (r *Run) StartedAtTime() (time.Time, error) {
	return time.Parse(time.RFC3339Nano, r.StartedAt)
}
165256
func WriteRuntime(path, runtime string) error {
	return ioutil.WriteFile(filepath.Join(path, "runtime"), []byte(runtime), 0600)
}
1373583
func (tlf *TLF) SetFileTime(ctx context.Context, fi *dokan.FileInfo, creation time.Time, lastAccess time.Time, lastWrite time.Time) (err error) {
	tlf.folder.fs.logEnter(ctx, "TLF SetFileTime")

	dir, err := tlf.loadDir(ctx, "TLF SetFileTime")
	if err != nil {
		return err
	}
	return dir.SetFileTime(ctx, fi, creation, lastAccess, lastWrite)
}
1136927
func (fi *darwinExFileInfo) CTime() time.Time {
	return timespecToTime(fi.Sys().(*syscall.Stat_t).Ctimespec)
}
1102003
func LoadFileTime(path string) (FileTime, error) {
	var ft = FileTime{}
	var st = unix.Stat_t{}

	err := unix.Stat(path, &st)
	if err != nil {
		return ft, err
	}

	ft.Changed = timeSpecToTime(st.Ctim)
	ft.Modified = timeSpecToTime(st.Mtim)
	ft.Accessed = timeSpecToTime(st.Atim)
	return ft, nil
}
398621
func (p *Process) GetUptime() time.Duration {
	if p.startTime.Nanosecond() == 0 {
		return 0
	}
	return time.Since(p.startTime)
}
410803
func (f *FSO) SetFileTime(ctx context.Context, fi *dokan.FileInfo, creation time.Time, lastAccess time.Time, lastWrite time.Time) (err error) {
	f.folder.fs.logEnter(ctx, "FSO SetFileTime")
	defer func() { f.folder.reportErr(ctx, libkbfs.WriteMode, err) }()
	f.folder.fs.log.CDebugf(ctx, "FSO SetFileTime %v %v %v", creation, lastAccess, lastWrite)

	if !lastWrite.IsZero() {
		return f.folder.fs.config.KBFSOps().SetMtime(ctx, f.node, &lastWrite)
	}

	return nil
}
155674
func (b *builtinTimestamp2ArgsSig) evalTime(row chunk.Row) (types.Time, bool, error) {
	arg0, isNull, err := b.args[0].EvalString(b.ctx, row)
	if isNull || err != nil {
		return types.Time{}, isNull, err
	}
	var tm types.Time
	sc := b.ctx.GetSessionVars().StmtCtx
	if b.isFloat {
		tm, err = types.ParseTimeFromFloatString(sc, arg0, mysql.TypeDatetime, types.GetFsp(arg0))
	} else {
		tm, err = types.ParseTime(sc, arg0, mysql.TypeDatetime, types.GetFsp(arg0))
	}
	if err != nil {
		return types.Time{}, true, handleInvalidTimeError(b.ctx, err)
	}
	arg1, isNull, err := b.args[1].EvalString(b.ctx, row)
	if isNull || err != nil {
		return types.Time{}, isNull, err
	}
	if !isDuration(arg1) {
		return types.Time{}, true, nil
	}
	duration, err := types.ParseDuration(sc, arg1, types.GetFsp(arg1))
	if err != nil {
		return types.Time{}, true, handleInvalidTimeError(b.ctx, err)
	}
	tmp, err := tm.Add(sc, duration)
	if err != nil {
		return types.Time{}, true, err
	}
	return tmp, false, nil
}
850472
func ParseTime(s string) (t time.Time, err error) {
	formats := []string{rssDate, rssDateV1, rssDateV2, rssDateV3, rssDateV4, time.RFC822, time.RFC822Z}
	for _, format := range formats {
		t, err = time.Parse(format, s)
		if err == nil {
			return
		}
	}
	return
}
540824
func (h *FileHeader) SetModTime(t time.Time) {
	h.ModifiedDate, h.ModifiedTime = timeToMsDosTime(t)
}