mirror of
https://github.com/2dust/v2rayN.git
synced 2026-01-10 20:49:51 +05:00
fix number may exceed 1024
修复网速可能超过1024的问题,比如1500 Byte 应该是 1.x KB
This commit is contained in:
@@ -57,14 +57,15 @@ namespace v2rayN.Forms
|
|||||||
{
|
{
|
||||||
double up_amount = 0.0, down_amount;
|
double up_amount = 0.0, down_amount;
|
||||||
string up_unit = "", down_unit;
|
string up_unit = "", down_unit;
|
||||||
|
|
||||||
|
up /= (ulong)(config.statisticsFreshRate / 1000f);
|
||||||
|
down /= (ulong)(config.statisticsFreshRate / 1000f);
|
||||||
|
|
||||||
Utils.ToHumanReadable(up, out up_amount, out up_unit);
|
Utils.ToHumanReadable(up, out up_amount, out up_unit);
|
||||||
Utils.ToHumanReadable(down, out down_amount, out down_unit);
|
Utils.ToHumanReadable(down, out down_amount, out down_unit);
|
||||||
up_unit += "/s";
|
up_unit += "/s";
|
||||||
down_unit += "/s";
|
down_unit += "/s";
|
||||||
|
|
||||||
up_amount /= config.statisticsFreshRate / 1000f;
|
|
||||||
down_amount /= config.statisticsFreshRate / 1000f;
|
|
||||||
|
|
||||||
toolSslBlank4.Text = string.Format(
|
toolSslBlank4.Text = string.Format(
|
||||||
"{4}: {0:f2} {1} | {5}: {2:f2} {3}",
|
"{4}: {0:f2} {1} | {5}: {2:f2} {3}",
|
||||||
up_amount,
|
up_amount,
|
||||||
|
|||||||
Reference in New Issue
Block a user