From 1f5df287c0ffcc2292fe173cc3fe0f1a322f19f9 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 17 Apr 2022 22:02:55 +0200 Subject: [PATCH] Remove useless code --- src/Interpreters/AsynchronousMetricLog.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Interpreters/AsynchronousMetricLog.cpp b/src/Interpreters/AsynchronousMetricLog.cpp index c755828bb23..2db50700fb6 100644 --- a/src/Interpreters/AsynchronousMetricLog.cpp +++ b/src/Interpreters/AsynchronousMetricLog.cpp @@ -32,18 +32,11 @@ void AsynchronousMetricLogElement::appendToBlock(MutableColumns & columns) const columns[column_idx++]->insert(value); } - -static inline UInt64 time_in_seconds(std::chrono::time_point timepoint) -{ - return std::chrono::duration_cast(timepoint.time_since_epoch()).count(); -} - void AsynchronousMetricLog::addValues(const AsynchronousMetricValues & values) { AsynchronousMetricLogElement element; - const auto now = std::chrono::system_clock::now(); - element.event_time = time_in_seconds(now); + element.event_time = time(nullptr); element.event_date = DateLUT::instance().toDayNum(element.event_time); for (const auto & [key, value] : values)