summaryrefslogtreecommitdiffstats
path: root/include/bmon/attr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bmon/attr.h')
-rw-r--r--include/bmon/attr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/bmon/attr.h b/include/bmon/attr.h
index 224f151..9d52c78 100644
--- a/include/bmon/attr.h
+++ b/include/bmon/attr.h
@@ -42,6 +42,9 @@ struct rate
/* Value of r_current at last read */
uint64_t r_prev;
+ /* Reset value to substract to emulate statistics reset */
+ uint64_t r_reset;
+
/* Rate per second calculated every `rate_interval' */
float r_rate;
@@ -49,6 +52,8 @@ struct rate
timestamp_t r_last_calc;
};
+extern uint64_t rate_get_total(struct rate *);
+
enum {
ATTR_TYPE_UNSPEC,
ATTR_TYPE_COUNTER,
@@ -134,5 +139,6 @@ extern struct attr * attr_select_prev(void);
extern struct attr * attr_current(void);
extern void attr_start_collecting_history(struct attr *);
+extern void attr_reset_counter(struct attr *a);
#endif