From 8f0dda5eab181b0f14f2652b4e984aaaae3f258c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 27 Jun 2022 18:27:13 -0700 Subject: Start from a clean slate --- 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