X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/3f45a5f7caf37ec04bbc3aea5e7def1452d1118c..b792b7ab69c24bedf8147c734a849ae0c54da1dc:/components/netspeeds.c diff --git a/components/netspeeds.c b/components/netspeeds.c index 14b7799..7ab1590 100644 --- a/components/netspeeds.c +++ b/components/netspeeds.c @@ -29,8 +29,8 @@ return NULL; } - return fmt_human_2((rxbytes - oldrxbytes) * - 1000 / interval, "B/s"); + return fmt_human((rxbytes - oldrxbytes) * 1000 / interval, + 1024); } const char * @@ -55,8 +55,8 @@ return NULL; } - return fmt_human_2((txbytes - oldtxbytes) * - 1000 / interval, "B/s"); + return fmt_human((txbytes - oldtxbytes) * 1000 / interval, + 1024); } #elif defined(__OpenBSD__) #include @@ -97,8 +97,8 @@ return NULL; } - return fmt_human_2((rxbytes - oldrxbytes) * - 1000 / interval, "B/s"); + return fmt_human((rxbytes - oldrxbytes) * 1000 / interval, + 1024); } const char * @@ -133,7 +133,7 @@ return NULL; } - return fmt_human_2((txbytes - oldtxbytes) * - 1000 / interval, "B/s"); + return fmt_human((txbytes - oldtxbytes) * 1000 / interval, + 1024); } #endif