sbm

simple bandwidth monitor
git clone git://git.2f30.org/sbm
Log | Files | Refs | LICENSE

commit bc55bf1d7a442eb2454b172ee5212c31e018ba07
parent d6c5ba887df451469cbd01a7860088d9ddff6a32
Author: sin <sin@2f30.org>
Date:   Mon, 22 Feb 2016 15:44:55 +0000

Fix terminology, rename sampling rate to sampling period

Diffstat:
Msbm.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sbm.c b/sbm.c @@ -40,7 +40,7 @@ #include "arg.h" -#define SAMPLINGRATE (100) /* sampling rate in ms */ +#define SAMPLINGPERIOD (100) /* sampling period in ms */ char *argv0; @@ -228,10 +228,10 @@ loop(char *ifname, long count, struct timeval *delay) sample(ifname, &oldrxbytes, &oldtxbytes, &oldrxpps, &oldtxpps); for (;;) { /* - * This is the maximum sampling rate that is supported and + * This is the minimum sampling period that is supported and * is always less than or equal to the given delay. */ - usleep(SAMPLINGRATE * 1000); + usleep(SAMPLINGPERIOD * 1000); sample(ifname, &rxbytes, &txbytes, &rxpps, &txpps); getmonotime(&now); timersub(&now, &old, &diff); @@ -279,8 +279,8 @@ main(int argc, char *argv[]) delay = strtol(EARGF(usage()), &end, 10); if (*end != '\0' || errno) errx(1, "invalid delay"); - if (delay < SAMPLINGRATE) - errx(1, "minimum delay is %d ms", SAMPLINGRATE); + if (delay < SAMPLINGPERIOD) + errx(1, "minimum delay is %d ms", SAMPLINGPERIOD); break; case 'i': strncpy(ifname, EARGF(usage()), sizeof(ifname));