diff options
author | rbuj <[email protected]> | 2020-12-02 09:54:00 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-12-13 15:45:33 +0100 |
commit | 61e25238728dd5cb9922932a5b7279eb6cdb15da (patch) | |
tree | 07c73bb9d083054c0d71d0a19e019d6f5ab5c710 /multiload/src/autoscaler.h | |
parent | 3cf85cb5229c3e87fed2f926004fed724e94e8cb (diff) | |
download | mate-applets-61e25238728dd5cb9922932a5b7279eb6cdb15da.tar.bz2 mate-applets-61e25238728dd5cb9922932a5b7279eb6cdb15da.tar.xz |
multiload: Use common subdirs - src, data
Diffstat (limited to 'multiload/src/autoscaler.h')
-rw-r--r-- | multiload/src/autoscaler.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/multiload/src/autoscaler.h b/multiload/src/autoscaler.h new file mode 100644 index 00000000..d0ae4cd6 --- /dev/null +++ b/multiload/src/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 */ |