diff --git a/CASC/PortfolioMode.cpp b/CASC/PortfolioMode.cpp index 003093fb73..77a81e85f3 100644 --- a/CASC/PortfolioMode.cpp +++ b/CASC/PortfolioMode.cpp @@ -558,10 +558,9 @@ unsigned PortfolioMode::getSliceTime(const vstring &sliceCode) vstring sliceInstrStr = sliceCode.substr(bidx,eidx-bidx); unsigned sliceInstr; ALWAYS(Int::stringToUnsignedInt(sliceInstrStr,sliceInstr)); - + // sliceTime is in deci second, we assume a roughly 2GHz CPU here - sliceTime = sliceInstr / 200; - if (sliceTime == 0) { sliceTime = 1; } + sliceTime = 1 + sliceInstr / 200; // rather round up than down (and never return 0 here) } return _slowness * sliceTime;