diff --git a/internal/common/common_linux.go b/internal/common/common_linux.go index 415c848..29a9be7 100644 --- a/internal/common/common_linux.go +++ b/internal/common/common_linux.go @@ -49,11 +49,6 @@ func NumProcs() (uint64, error) { // cachedBootTime must be accessed via atomic.Load/StoreUint64 var cachedBootTime uint64 -// BootTime returns the system boot time expressed in seconds since the epoch. -func BootTime() (uint64, error) { - return BootTimeWithContext(context.Background()) -} - func BootTimeWithContext(ctx context.Context) (uint64, error) { t := atomic.LoadUint64(&cachedBootTime) if t != 0 { diff --git a/process/process_linux.go b/process/process_linux.go index 49e5829..c3d2c12 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -1235,7 +1235,7 @@ func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (ui System: float64(stime / ClockTicks), } - bootTime, _ := common.BootTime() + bootTime, _ := common.BootTimeWithContext(ctx) t, err := strconv.ParseUint(fields[i+20], 10, 64) if err != nil { return 0, 0, nil, 0, 0, 0, nil, err