Add configurable I/O timeout

This commit is contained in:
pixl
2020-07-08 03:41:05 -04:00
parent 055d136b09
commit bc8f1a983a
4 changed files with 40 additions and 5 deletions
+6
View File
@@ -22,6 +22,9 @@
#include <map>
#include <libconfig.h++>
#include <memory>
#include <chrono>
#define LOGID_DEFAULT_RAWDEVICE_TIMEOUT std::chrono::seconds(2)
namespace logid
{
@@ -41,8 +44,11 @@ namespace logid
private:
std::string _name;
};
std::chrono::milliseconds ioTimeout() const;
private:
std::map<std::string, std::string> _device_paths;
std::chrono::milliseconds _io_timeout;
libconfig::Config _config;
};