Function mrpt::system::intervalFormat

Function Documentation

std::string mrpt::system::intervalFormat(double seconds)

This function implements time interval formatting: Given a time in seconds, it will return a string describing the interval with the most appropriate unit. E.g.:

  • ”1 year, 3 days, 4 minutes”

  • ”3 days, 8 hours”

  • ”9 hours, 4 minutes, 4.3 sec”,

  • ”3.34 sec”

  • ”178.1 ms”

  • ”87.1 us”

See also

unitsFormat