// CPUTime returns the total CPU user and system time in seconds.
18774
func (s ProcStat) CPUTime() float64 {
	return float64(s.UTime+s.STime) / userHZ
}
173285
func (e *Event) Time(key string, t time.Time) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendTime(enc.AppendKey(e.buf, key), t, TimeFieldFormat)
	return e
}
662539
func (timestamp *Timestamp) Time() time.Time {
	return time.Date(timestamp.Year, time.Month(timestamp.Month), timestamp.Day,
		timestamp.Hour, timestamp.Min, timestamp.Sec, timestamp.NanoSec, time.UTC)
}
33573
func Time(v time.Time) *time.Time {
	p := new(time.Time)
	*p = v
	return p
}
89950
func StartTime(t time.Time) func(*sonyflake.Settings) {
	return func(s *sonyflake.Settings) {
		s.StartTime = t
	}
}
646408
func (instance *ProcessInstance) StartTime() time.Time {
	return time.Now().Add(-instance.Uptime)
}
1251696
func (k *Key) Time() (time.Time, error) {
	return k.TimeFormat(time.RFC3339)
}
336472
func (pt *PlaylistTrack) Time() time.Time {
	t := C.sp_playlist_track_create_time(pt.playlist.sp_playlist, C.int(pt.index))
	return time.Unix(int64(t), 0)
}
442464
func localTime(ifZero string, t time.Time) template.HTML {
	return localTimeCommon(ifZero, t, "", t.Format(time.RFC850))
}
7343
func GetBootTime() (time.Time, error) {
	currentTime := time.Now()
	output, _, err := tickCount.Call()
	if errno, ok := err.(syscall.Errno); !ok || errno != 0 {
		return time.Time{}, err
	}
	return currentTime.Add(-time.Duration(output) * time.Millisecond).Truncate(time.Second), nil
}
514073
func calculatePcts(lastTimes cpu.TimesStat, curTimes cpu.TimesStat) cpu.TimesStat {
	totalDelta := curTimes.Total() - lastTimes.Total()
	return cpu.TimesStat{
		User:      formatPct(curTimes.User-lastTimes.User, totalDelta),
		System:    formatPct(curTimes.System-lastTimes.System, totalDelta),
		Idle:      formatPct(curTimes.Idle-lastTimes.Idle, totalDelta),
		Nice:      formatPct(curTimes.Nice-lastTimes.Nice, totalDelta),
		Iowait:    formatPct(curTimes.Iowait-lastTimes.Iowait, totalDelta),
		Irq:       formatPct(curTimes.Irq-lastTimes.Irq, totalDelta),
		Softirq:   formatPct(curTimes.Softirq-lastTimes.Softirq, totalDelta),
		Steal:     formatPct(curTimes.Steal-lastTimes.Steal, totalDelta),
		Guest:     formatPct(curTimes.Guest-lastTimes.Guest, totalDelta),
		GuestNice: formatPct(curTimes.GuestNice-lastTimes.GuestNice, totalDelta),
		Stolen:    formatPct(curTimes.Stolen-lastTimes.Stolen, totalDelta),
	}
}
1284873
func GetBootTime() (time.Time, error) {
	currentTime := time.Now()
	var info unix.Sysinfo_t
	if err := unix.Sysinfo(&info); err != nil {
		return time.Time{}, fmt.Errorf("error getting system uptime: %s", err)
	}
	return currentTime.Add(-time.Duration(info.Uptime) * time.Second).Truncate(time.Second), nil
}
875342
func Time(from time.Time, maxDelta time.Duration) time.Time {
	globalLk.Lock()
	defer globalLk.Unlock()
	return globalGen.Time(from, maxDelta)
}
954571
func (topo *CPUTopology) CPUsPerCore() int {
	if topo.NumCores == 0 {
		return 0
	}
	return topo.NumCPUs / topo.NumCores
}
972814
func (s *systemInfo) CPUMHz() (int, error) {
	err := s.collectPlatformInfo()
	if err != nil {
		return 0, err
	}
	return s.cpuMHz, nil
}
286892
func compileTime() time.Time {
	info, err := os.Stat(os.Args[0])
	if err != nil {
		return time.Now()
	}
	return info.ModTime()
}
1172060
func (h *Timing) PageDownloadTime(pageDownloadTime int64) *Timing {
	h.pageDownloadTime = pageDownloadTime
	h.pageDownloadTimeSet = true
	return h
}