X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/ec5c35ec9f23254f09e734d0c1880559774dfa52..37724ac2c3f496f4736223d0d8e5d8fecb933590:/components/netspeeds.c diff --git a/components/netspeeds.c b/components/netspeeds.c index 76557e0..3c5dabf 100644 --- a/components/netspeeds.c +++ b/components/netspeeds.c @@ -29,7 +29,8 @@ return NULL; } - return fmt_human_2((rxbytes - oldrxbytes) * 1000 / interval); + return fmt_human((rxbytes - oldrxbytes) * 1000 / interval, + 1024); } const char * @@ -54,7 +55,8 @@ return NULL; } - return fmt_human_2((txbytes - oldtxbytes) * 1000 / interval); + return fmt_human((txbytes - oldtxbytes) * 1000 / interval, + 1024); } #elif defined(__OpenBSD__) #include @@ -95,7 +97,8 @@ return NULL; } - return fmt_human_2((rxbytes - oldrxbytes) * 1000 / interval); + return fmt_human((rxbytes - oldrxbytes) * 1000 / interval, + 1024); } const char * @@ -130,6 +133,7 @@ return NULL; } - return fmt_human_2((txbytes - oldtxbytes) * 1000 / interval); + return fmt_human((txbytes - oldtxbytes) * 1000 / interval, + 1024); } #endif