Skip to content

Commit

Permalink
Update process/process.go
Browse files Browse the repository at this point in the history
Co-authored-by: shirou <[email protected]>
  • Loading branch information
TheBestLL and shirou authored Aug 24, 2024
1 parent fea0926 commit cc21c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func calculatePercent(t1, t2 *cpu.TimesStat, delta float64, numcpu int) float64
if delta == 0 {
return 0
}
//https://github1s.com/giampaolo/psutil/blob/c034e6692cf736b5e87d14418a8153bb03f6cf42/psutil/__init__.py#L1064
// https://github.com/giampaolo/psutil/blob/c034e6692cf736b5e87d14418a8153bb03f6cf42/psutil/__init__.py#L1064
delta_proc := (t2.User - t1.User) + (t2.System - t1.System)
if delta_proc <= 0 {
return 0
Expand Down

0 comments on commit cc21c22

Please sign in to comment.