libcryfs/implementations/caching/cache/PeriodicTask.h

26 lines
480 B
C
Raw Normal View History

2015-10-15 13:09:21 +02:00
#pragma once
#ifndef MESSMER_BLOCKSTORE_IMPLEMENTATIONS_CACHING_CACHE_PERIODICTASK_H_
#define MESSMER_BLOCKSTORE_IMPLEMENTATIONS_CACHING_CACHE_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