diff options
Diffstat (limited to 'multiload/src/autoscaler.h')
-rw-r--r-- | multiload/src/autoscaler.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/multiload/src/autoscaler.h b/multiload/src/autoscaler.h new file mode 100644 index 00000000..ef4e0946 --- /dev/null +++ b/multiload/src/autoscaler.h @@ -0,0 +1,22 @@ +#ifndef MATE_APPLETS_MULTILOAD_AUTOSCALER_H +#define MATE_APPLETS_MULTILOAD_AUTOSCALER_H + +#include <glib.h> + +typedef struct _AutoScaler AutoScaler; + +struct _AutoScaler +{ + gint64 update_interval; + gint64 last_update; + guint64 floor; + guint64 max; + guint64 count; + guint64 sum; + float last_average; +}; + +G_GNUC_INTERNAL void autoscaler_init (AutoScaler *that, gint64 interval, guint64 floor); +G_GNUC_INTERNAL guint64 autoscaler_get_max (AutoScaler *that, guint64 current); + +#endif /* MATE_APPLETS_MULTILOAD_AUTOSCALER_H */ |