summaryrefslogtreecommitdiff
path: root/core/src/Utils/Time.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-27 18:27:13 -0700
committerrtk0c <[email protected]>2022-06-27 18:27:13 -0700
commit8f0dda5eab181b0f14f2652b4e984aaaae3f258c (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /core/src/Utils/Time.cpp
parentfad6a88a13ab1f888ab25ad0aae19c1d63aa0623 (diff)
Start from a clean slate
Diffstat (limited to 'core/src/Utils/Time.cpp')
-rw-r--r--core/src/Utils/Time.cpp29
1 files changed, 0 insertions, 29 deletions
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 <ctime>
-
-std::string TimeUtils::StringifyTimePoint(std::chrono::time_point<std::chrono::system_clock> 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<chrono::system_clock> tp{ d };
-
- return StringifyTimePoint(tp);
-}