From 3dc12249d36575518e868bc39976d63ed4254516 Mon Sep 17 00:00:00 2001 From: Johannes Edmeier Date: Mon, 23 Sep 2024 15:43:36 +0200 Subject: [PATCH] Allow subsecont precision for process create time --- process/process_linux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/process/process_linux.go b/process/process_linux.go index 4f1669346..68a8c88c4 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -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 {