C++17 adds template
std::optional to manage an optional value.
Try to make pass the tests for error cases. Do not worry about the good case test, if it fails because of formating or precision issues.
Make the tests pass by refactoring function
differentiate to return
std::optional<double> instead of
Does it help to make use of
Replace the type for time with something better than than double.