Skip to content
Snippets Groups Projects
Commit 2d73f745 authored by Marco Filho's avatar Marco Filho
Browse files

Style: run pre-commit

parent 0443c472
No related branches found
No related tags found
1 merge request!7Major refactor
...@@ -63,12 +63,10 @@ int VecUtils::getIndex(std::vector<std::vector<int>>& vec, int function, int& hy ...@@ -63,12 +63,10 @@ int VecUtils::getIndex(std::vector<std::vector<int>>& vec, int function, int& hy
/** /**
* @brief Converts a timestamp to a string. * @brief Converts a timestamp to a string.
*/ */
std::string TimeUtils::timeToStr(std::chrono::time_point<std::chrono::system_clock> timestamp){ std::string TimeUtils::timeToStr(std::chrono::time_point<std::chrono::system_clock> timestamp) {
std::time_t time_t_value = std::chrono::system_clock::to_time_t(timestamp); std::time_t time_t_value = std::chrono::system_clock::to_time_t(timestamp);
std::tm tm_value = *std::localtime(&time_t_value); std::tm tm_value = *std::localtime(&time_t_value);
std::ostringstream oss; std::ostringstream oss;
oss << std::put_time(&tm_value, "%Y-%m-%d %H:%M:%S"); oss << std::put_time(&tm_value, "%Y-%m-%d %H:%M:%S");
return oss.str(); return oss.str();
} }
\ No newline at end of file
// Generic utilities for the module // Generic utilities for the module
#include <vector>
#include <string>
#include <chrono> #include <chrono>
#include <string>
#include <vector>
namespace VecUtils { namespace VecUtils {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment