Skip to content
Snippets Groups Projects
Commit 5bc39755 authored by kr328's avatar kr328
Browse files

Fix: fix traffic format

parent 5e54e456
No related branches found
No related tags found
No related merge requests found
......@@ -22,17 +22,17 @@ private fun trafficString(scaled: Long): String {
scaled > 1024 * 1024 * 1024 * 100L -> {
val data = scaled / 1024 / 1024 / 1024
"${data / 100}.${data % 100} GiB"
String.format("%.2f GiB", data.toFloat() / 100)
}
scaled > 1024 * 1024 * 100L -> {
val data = scaled / 1024 / 1024
"${data / 100}.${data % 100} MiB"
String.format("%.2f MiB", data.toFloat() / 100)
}
scaled > 1024 * 100L -> {
val data = scaled / 1024
"${data / 100}.${data % 100} KiB"
String.format("%.2f KiB", data.toFloat() / 100)
}
else -> {
"$scaled Bytes"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment