Commit 3fa8a0c9 authored by Mygod's avatar Mygod

Refine roundings for TrafficMonitor

parent f121ea25
...@@ -45,7 +45,7 @@ object TrafficMonitor { ...@@ -45,7 +45,7 @@ object TrafficMonitor {
def formatTraffic(size: Long): String = { def formatTraffic(size: Long): String = {
var n: Double = size var n: Double = size
var i = -1 var i = -1
while (n >= 1000) { while (n >= 999.5) {
n /= 1024 n /= 1024
i = i + 1 i = i + 1
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment