move timespec2seconds exception handling to calling function

This commit is contained in:
Axel Kohlmeyer
2025-01-12 17:48:20 -05:00
parent 60b10c1588
commit 943504fd98
2 changed files with 12 additions and 10 deletions

View File

@ -1744,13 +1744,9 @@ double utils::timespec2seconds(const std::string &timespec)
ValueTokenizer values(timespec, ":");
try {
for (i = 0; i < 3; i++) {
if (!values.has_next()) break;
vals[i] = values.next_double();
}
} catch (TokenizerException &) {
return -1.0;
for (i = 0; i < 3; i++) {
if (!values.has_next()) break;
vals[i] = values.next_double();
}
if (i == 3)