diff options
Diffstat (limited to 'widgets/proc.go')
-rw-r--r-- | widgets/proc.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/widgets/proc.go b/widgets/proc.go index f47f646..218ba63 100644 --- a/widgets/proc.go +++ b/widgets/proc.go @@ -9,9 +9,8 @@ import ( "strings" "time" - psCPU "github.com/shirou/gopsutil/cpu" - tui "github.com/gizak/termui/v3" + "github.com/xxxserxxx/gotop/v4/devices" ui "github.com/xxxserxxx/gotop/v4/termui" "github.com/xxxserxxx/gotop/v4/utils" ) @@ -49,7 +48,7 @@ type ProcWidget struct { } func NewProcWidget() *ProcWidget { - cpuCount, err := psCPU.Counts(false) + cpuCount, err := devices.CpuCount() if err != nil { log.Printf("failed to get CPU count from gopsutil: %v", err) } |