libcryfs/implementations/caching/PeriodicTask.h
2015-04-26 12:36:19 +02:00

25 lines
455 B
C++

#ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_CACHING_PERIODICTASK_H_
#define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_CACHING_PERIODICTASK_H_
#include <functional>
#include <boost/thread.hpp>
namespace blockstore {
namespace caching {
class PeriodicTask {
public:
PeriodicTask(std::function<void ()> task, double intervalSec);
virtual ~PeriodicTask();
private:
boost::thread _thread;
std::function<void ()> _task;
double _intervalSec;
};
}
}
#endif