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)