diff options
author | Perberos <[email protected]> | 2011-11-14 18:24:48 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2011-11-14 18:24:48 -0300 |
commit | 312ba610a1e98fc656fb58178227d7d45a64494e (patch) | |
tree | 54a3c2b6084c80e63fb0526c6e7b8e01627acbd7 /multiload/autoscaler.h | |
download | mate-applets-312ba610a1e98fc656fb58178227d7d45a64494e.tar.bz2 mate-applets-312ba610a1e98fc656fb58178227d7d45a64494e.tar.xz |
initial
Diffstat (limited to 'multiload/autoscaler.h')
-rw-r--r-- | multiload/autoscaler.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/multiload/autoscaler.h b/multiload/autoscaler.h new file mode 100644 index 00000000..11ca588b --- /dev/null +++ b/multiload/autoscaler.h @@ -0,0 +1,26 @@ +#ifndef MATE_APPLETS_MULTILOAD_AUTOSCALER_H +#define MATE_APPLETS_MULTILOAD_AUTOSCALER_H + +#include <glib.h> +#include <time.h> + +typedef struct _AutoScaler AutoScaler; + +struct _AutoScaler +{ + /* const */ unsigned update_interval; + /* const */ unsigned floor; + unsigned max; + unsigned count; + time_t last_update; + float sum; + float last_average; +}; + + +G_GNUC_INTERNAL void autoscaler_init(AutoScaler *that, unsigned interval, unsigned floor); + +G_GNUC_INTERNAL unsigned autoscaler_get_max(AutoScaler *that, unsigned current); + + +#endif /* MATE_APPLETS_MULTILOAD_AUTOSCALER_H */ |