mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
Merge pull request #1713 from joshiste/joshiste-precise-create-time
Fix resolution for process create time limited to seconds
This commit is contained in:
commit
7ec134321c
@ -1096,8 +1096,7 @@ func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (ui
|
||||
if err != nil {
|
||||
return 0, 0, nil, 0, 0, 0, nil, err
|
||||
}
|
||||
ctime := (t / uint64(clockTicks)) + uint64(bootTime)
|
||||
createTime := int64(ctime * 1000)
|
||||
createTime := int64((t * 1000 / uint64(clockTicks)) + uint64(bootTime*1000))
|
||||
|
||||
rtpriority, err := strconv.ParseInt(fields[18], 10, 32)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user