]> git.sesse.net Git - cubemap/blob - input_stats.h
Use memcpy instead of incurring potential unaligned reads when reading the Metacube...
[cubemap] / input_stats.h
1 #ifndef _INPUT_STATS_H
2 #define _INPUT_STATS_H 1
3
4 #include "thread.h"
5 #include <string>
6 #include <vector>
7
8 // A thread that regularly writes out input statistics, ie. a list of all inputs
9 // with some information about each. Very similar to StatsThread, but for inputs instead
10 // of clients.
11
12 class InputStatsThread : public Thread {
13 public:
14         // Does not take ownership of the inputs.
15         InputStatsThread(const std::string &stats_file, int stats_interval, const std::vector<Input*> &inputs);
16
17 private:
18         virtual void do_work();
19
20         std::string stats_file;
21         int stats_interval;
22         std::vector<Input*> inputs;
23 };
24         
25 #endif  // !defined(_INPUT_STATS_H)