diff options
author | Thomas Graf <tgraf@suug.ch> | 2014-05-08 15:16:38 +0200 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2014-05-08 15:16:38 +0200 |
commit | 46ec101b00e1e1a791bb8b587a5c0907c41fd601 (patch) | |
tree | b6d74429c0828dd0194a8c5613c68d3434e8e48f /include | |
parent | 127ffda0157ea3c60f7dec181de5d6b6d74b1312 (diff) |
Add -b / --use-bit option to display rates in bit/s instead of bytes/s
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'include')
-rw-r--r-- | include/bmon/unit.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/bmon/unit.h b/include/bmon/unit.h index e0a83d3..ed88a24 100644 --- a/include/bmon/unit.h +++ b/include/bmon/unit.h @@ -33,6 +33,7 @@ enum { UNIT_DEFAULT, UNIT_SI, + UNIT_BIT, __UNIT_MAX, }; @@ -42,7 +43,7 @@ enum { #define UNIT_NUMBER "number" struct fraction { - uint64_t f_divisor; + float f_divisor; char * f_name; struct list_head f_list; @@ -58,7 +59,7 @@ struct unit { extern struct unit * unit_lookup(const char *); extern struct unit * unit_add(const char *name); extern void unit_add_div(struct unit *, int, const char *, float); -extern uint64_t unit_divisor(uint64_t, struct unit *, char **, int *); +extern double unit_divisor(uint64_t, struct unit *, char **, int *); extern double unit_value2str(uint64_t, struct unit *, char **, int *); extern void fraction_free(struct fraction *); |