#ifndef REMOTING_HOST_CAPTURE_SCHEDULER_H_
#define REMOTING_HOST_CAPTURE_SCHEDULER_H_
#include "base/time/time.h"
#include "remoting/base/running_average.h"
namespace remoting {
class CaptureScheduler {
public:
CaptureScheduler();
~CaptureScheduler();
base::TimeDelta NextCaptureDelay();
void RecordCaptureTime(base::TimeDelta capture_time);
void RecordEncodeTime(base::TimeDelta encode_time);
void set_minimum_interval(base::TimeDelta minimum_interval) {
minimum_interval_ = minimum_interval;
}
void SetNumOfProcessorsForTest(int num_of_processors);
private:
base::TimeDelta minimum_interval_;
int num_of_processors_;
RunningAverage capture_time_;
RunningAverage encode_time_;
DISALLOW_COPY_AND_ASSIGN(CaptureScheduler);
};
}
#endif