43 if (r.find(
":") == std::string::npos) {
45 std::istringstream buf(r);
48 throw ProcessError(
"Input string '" + r +
"' is not a valid number or exceeds the time value range.");
54 if (hrt.size() == 3) {
57 }
else if (hrt.size() == 4) {
61 throw ProcessError(
"Input string '" + r +
"' is not a valid time format (jj:HH:MM:SS.S).");
68 std::ostringstream oss;
76 oss << (int)(s / (3600 * 24)) <<
":";
77 s = fmod(s, 3600 * 24);
83 oss << (int)(s / 3600) <<
":";
89 oss << (int)(s / 60) <<
":";
94 if (fmod(s, 1) == 0) {
int gPrecision
the precision for floating point outputs
std::string time2string(SUMOTime t)
SUMOTime string2time(const std::string &r)
std::vector< std::string > getVector()