Move timespec2seconds to utils

This commit is contained in:
Richard Berger
2020-08-03 16:54:53 -04:00
parent 944ac44b44
commit 4126ba24c1
4 changed files with 59 additions and 27 deletions

View File

@ -291,6 +291,16 @@ namespace LAMMPS_NS {
* \return conversion factor
*/
double get_conversion_factor(const int property, const int conversion);
// convert a timespec ([[HH:]MM:]SS) to seconds
/**
* \brief Convert a time string to seconds
* The strings "off" and "unlimited" result in -1
* \param timespec a string in the following format: ([[HH:]MM:]SS)
* \return total in seconds
*/
double timespec2seconds(const std::string & timespec);
}
}