cpp : Added documentation

This commit is contained in:
saundersp
2024-04-28 22:11:33 +02:00
parent f7ac38b93a
commit c71b04f00d
16 changed files with 797 additions and 295 deletions

View File

@ -11,7 +11,7 @@ static const constexpr std::array<uint64_t, N_TIMES> time_numbers = { 1, u64(1e3
* @brief Format the time in seconds in human readable format.
*
* @param time number of seconds
* @return The formatted human readable string.
* @return The formatted human readable string
*/
std::string format_time(uint64_t time) noexcept {
if (time == 0)
@ -38,7 +38,7 @@ std::string format_time(uint64_t time) noexcept {
* @brief Format the time in nanoseconds in human readable format.
*
* @param time Time in nanoseconds
* @return std::string The formatted human readable string.
* @return std::string The formatted human readable string
*/
std::string format_time_ns(uint64_t time) noexcept {
if (time == 0)
@ -115,13 +115,4 @@ std::string thousand_sep(uint64_t k, const char& separator) noexcept {
}
return s;
//uint64_t len = n.length(), dlen = 3;
//while (len > dlen) {
// n.insert(len - dlen, 1, separator);
// dlen += 4;
// len += 1;
//}
//return n;
}