StartTime returns the unix timestamp of the process in seconds.
()
| 222 | |
| 223 | // StartTime returns the unix timestamp of the process in seconds. |
| 224 | func (s ProcStat) StartTime() (float64, error) { |
| 225 | stat, err := s.proc.Stat() |
| 226 | if err != nil { |
| 227 | return 0, err |
| 228 | } |
| 229 | return float64(stat.BootTime) + (float64(s.Starttime) / userHZ), nil |
| 230 | } |
| 231 | |
| 232 | // CPUTime returns the total CPU user and system time in seconds. |
| 233 | func (s ProcStat) CPUTime() float64 { |