Skip to content

Commit

Permalink
Merge pull request #864 from GameXG/master
Browse files Browse the repository at this point in the history
fix #863 Swap.UsedPercent is inconsistent
  • Loading branch information
Lomanic authored May 4, 2020
2 parents a81cf97 + 144c678 commit 987c949
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mem/mem_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
if tot == 0 {
usedPercent = 0
} else {
usedPercent = float64(used) / float64(tot)
usedPercent = float64(used) / float64(tot) * 100
}
ret := &SwapMemoryStat{
Total: tot,
Expand Down

0 comments on commit 987c949

Please sign in to comment.