From 7fe47a9d5b1727a61dc724523b530762f6d6ba19 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 30 Jun 2022 21:38:53 -0700 Subject: Restructure project --- core/src/Utils/Time.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 core/src/Utils/Time.cpp (limited to 'core/src/Utils/Time.cpp') diff --git a/core/src/Utils/Time.cpp b/core/src/Utils/Time.cpp deleted file mode 100644 index 4e79ffa..0000000 --- a/core/src/Utils/Time.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "Time.hpp" - -#include - -std::string TimeUtils::StringifyTimePoint(std::chrono::time_point tp) -{ - auto t = std::chrono::system_clock::to_time_t(tp); - - char data[32]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" // C++ doesn't have std::localtime_s - std::strftime(data, sizeof(data), "%Y-%m-%d %H:%M:%S", std::localtime(&t)); -#pragma clang diagnostic pop - - return std::string(data); -} - -std::string TimeUtils::StringifyTimeStamp(int64_t timeStamp) -{ - if (timeStamp == 0) { - return ""; - } - - namespace chrono = std::chrono; - chrono::milliseconds d{ timeStamp }; - chrono::time_point tp{ d }; - - return StringifyTimePoint(tp); -} -- cgit v1.2.3-70-g09d2