Skip to content

Commit

Permalink
Merge pull request #1713 from joshiste/joshiste-precise-create-time
Browse files Browse the repository at this point in the history
Fix resolution for process create time limited to seconds
  • Loading branch information
shirou authored Sep 26, 2024
2 parents 4140cda + 3dc1224 commit 7ec1343
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions process/process_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7ec1343

Please sign in to comment.