toolbox/format_time/src/format_time.hpp
2024-11-07 22:23:49 +01:00

20 lines
478 B
C++

#pragma once
#include <string>
#include <stdint.h>
/**
* @brief Convert a given number of seconds to a human readable format
*
* @param time Number of seconds
* @return Human readable formatted string
*/
std::string format_time(uint64_t time) noexcept;
/**
* @brief Convert a given number of nanoseconds to a human readable format
*
* @param time Number of nanoseconds
* @return Human readable formatted string
*/
std::string format_time_ns(uint64_t time) noexcept;