File: input_stats.h

package info (click to toggle)
cubemap 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 428 kB
  • sloc: cpp: 4,431; sh: 114; perl: 102; makefile: 60
file content (28 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _INPUT_STATS_H
#define _INPUT_STATS_H 1

#include <string>
#include <vector>

#include "thread.h"

class Input;

// 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<Input*> &inputs);

private:
	virtual void do_work();

	std::string stats_file;
	int stats_interval;
	std::vector<Input*> inputs;
};
	
#endif  // !defined(_INPUT_STATS_H)