Skip to content

Commit

Permalink
Merge pull request #826 from apernet/wip-fix-bpsconv
Browse files Browse the repository at this point in the history
fix: bps conv (should be 1000 not 1024)
  • Loading branch information
tobyxdd committed Nov 19, 2023
2 parents cccb955 + 6d6a26b commit ee3a23f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/internal/utils/bpsconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
)

const (
Byte = 1.0 << (10 * iota)
Kilobyte
Megabyte
Gigabyte
Terabyte
Byte = 1
Kilobyte = Byte * 1000
Megabyte = Kilobyte * 1000
Gigabyte = Megabyte * 1000
Terabyte = Gigabyte * 1000
)

// StringToBps converts a string to a bandwidth value in bytes per second.
Expand Down

0 comments on commit ee3a23f

Please sign in to comment.