43 if (r.find(
":") == std::string::npos) {
46 throw ProcessError(
"Input string '" + r +
"' exceeds the time value range.");
52 if (hrt.size() == 3) {
55 }
else if (hrt.size() == 4) {
59 throw ProcessError(
"Input string '" + r +
"' is not a valid time format (jj:HH:MM:SS.S).");
66 std::ostringstream oss;
74 oss << (int)(s / (3600 * 24)) <<
":";
75 s = fmod(s, 3600 * 24);
81 oss << (int)(s / 3600) <<
":";
87 oss << (int)(s / 60) <<
":";
92 if (fmod(s, 1) == 0) {
int gPrecision
the precision for floating point outputs
std::string time2string(SUMOTime t)
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
SUMOTime string2time(const std::string &r)
std::vector< std::string > getVector()