Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions concoredocker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, std::string> params;

std::string stripstr(const std::string& str) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -166,7 +166,7 @@ class Concore {
try {
std::vector<std::string> 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<std::string>(inval.begin() + 1, inval.end());
}
Expand Down Expand Up @@ -195,7 +195,7 @@ class Concore {
try {
std::vector<std::string> val = parselist(simtime_val);
if (!val.empty()) {
simtime = (int)std::stod(val[0]);
simtime = std::stod(val[0]);
return std::vector<std::string>(val.begin() + 1, val.end());
}
} catch (...) {}
Expand Down