X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=input_stats.h;fp=input_stats.h;h=1149b7cce2412b3bc5bee670c8fe4ad213358fa3;hb=bd694fdd3dd1417399aecead2c8b91fc4fe95ce8;hp=0000000000000000000000000000000000000000;hpb=4a33511c426ae90abb261f09fda1e31e0c30ca16;p=cubemap diff --git a/input_stats.h b/input_stats.h new file mode 100644 index 0000000..1149b7c --- /dev/null +++ b/input_stats.h @@ -0,0 +1,25 @@ +#ifndef _INPUT_STATS_H +#define _INPUT_STATS_H 1 + +#include "thread.h" +#include +#include + +// A thread that regularly writes out input statistics, ie. a list of all inputs +// with some information about each. Very similar to StatsThread, but for inputs instead +// of clients. + +class InputStatsThread : public Thread { +public: + // Does not take ownership of the inputs. + InputStatsThread(const std::string &stats_file, int stats_interval, const std::vector &inputs); + +private: + virtual void do_work(); + + std::string stats_file; + int stats_interval; + std::vector inputs; +}; + +#endif // !defined(_INPUT_STATS_H)