Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Add the percent sign to *_perc functions
[slstatus.git]
/
components
/
netspeeds.c
diff --git
a/components/netspeeds.c
b/components/netspeeds.c
index
6adc3ea
..
32e78d6
100644
(file)
--- a/
components/netspeeds.c
+++ b/
components/netspeeds.c
@@
-26,8
+26,8
@@
return NULL;
}
return NULL;
}
- return oldrxbytes ? fmt_scaled((rxbytes - oldrxbytes)
/
-
interval * 1000
) : NULL;
+ return oldrxbytes ? fmt_scaled((rxbytes - oldrxbytes)
*
+
1000 / interval
) : NULL;
}
const char *
}
const char *
@@
-49,8
+49,8
@@
return NULL;
}
return NULL;
}
- return oldtxbytes ? fmt_scaled((txbytes - oldtxbytes)
/
-
interval * 1000
) : NULL;
+ return oldtxbytes ? fmt_scaled((txbytes - oldtxbytes)
*
+
1000 / interval
) : NULL;
}
#elif defined(__OpenBSD__)
#include <string.h>
}
#elif defined(__OpenBSD__)
#include <string.h>
@@
-88,8
+88,8
@@
return NULL;
}
return NULL;
}
- return oldrxbytes ? fmt_scaled((rxbytes - oldrxbytes)
/
-
interval * 1000
) : NULL;
+ return oldrxbytes ? fmt_scaled((rxbytes - oldrxbytes)
*
+
1000 / interval
) : NULL;
}
const char *
}
const char *
@@
-121,7
+121,7
@@
return NULL;
}
return NULL;
}
- return oldtxbytes ? fmt_scaled((txbytes - oldtxbytes)
/
-
interval * 1000
) : NULL;
+ return oldtxbytes ? fmt_scaled((txbytes - oldtxbytes)
*
+
1000 / interval
) : NULL;
}
#endif
}
#endif