diff --git a/concoredocker.hpp b/concoredocker.hpp index 2471e3e..c142592 100644 --- a/concoredocker.hpp +++ b/concoredocker.hpp @@ -23,8 +23,8 @@ class Concore { int retrycount = 0; std::string inpath = "/in"; std::string outpath = "/out"; - int simtime = 0; - int maxtime = 100; + double simtime = 0; + double maxtime = 100; std::unordered_map params; std::string stripstr(const std::string& str) { @@ -119,7 +119,7 @@ class Concore { return params.count(n) ? params[n] : i; } - void default_maxtime(int defaultValue) { + void default_maxtime(double defaultValue) { maxtime = defaultValue; std::ifstream file(inpath + "/1/concore.maxtime"); if (file) { @@ -166,7 +166,7 @@ class Concore { try { std::vector inval = parselist(ins); if (!inval.empty()) { - int file_simtime = (int)std::stod(inval[0]); + double file_simtime = std::stod(inval[0]); simtime = std::max(simtime, file_simtime); return std::vector(inval.begin() + 1, inval.end()); } @@ -195,7 +195,7 @@ class Concore { try { std::vector val = parselist(simtime_val); if (!val.empty()) { - simtime = (int)std::stod(val[0]); + simtime = std::stod(val[0]); return std::vector(val.begin() + 1, val.end()); } } catch (...) {}