From 6a40d0f53e7b84b1a97f120bdb7e5cfdb750d66c Mon Sep 17 00:00:00 2001 From: Avinash Kumar Deepak Date: Wed, 18 Feb 2026 15:43:07 +0530 Subject: [PATCH] fix: use double for simtime/maxtime in concoredocker.hpp --- concoredocker.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/concoredocker.hpp b/concoredocker.hpp index 2471e3ec..c142592a 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 (...) {}