Skip to content

Commit 209760a

Browse files
committed
Fixes IWYU and asan
1 parent 52a7c1f commit 209760a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sdk/src/logs/multi_log_record_processor.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
#include <algorithm>
54
#include <chrono>
65
#include <memory>
6+
#include <ratio>
77
#include <utility>
88
#include <vector>
99

@@ -80,8 +80,8 @@ bool MultiLogRecordProcessor::ForceFlush(std::chrono::microseconds timeout) noex
8080
auto start_time = std::chrono::system_clock::now();
8181
auto overflow_checker = std::chrono::system_clock::time_point::max();
8282
std::chrono::system_clock::time_point expire_time;
83-
if (std::chrono::duration_cast<std::chrono::system_clock::duration>(overflow_checker -
84-
start_time) <= timeout)
83+
if (std::chrono::duration_cast<std::chrono::microseconds>(overflow_checker - start_time) <=
84+
timeout)
8585
{
8686
expire_time = overflow_checker;
8787
}
@@ -115,8 +115,8 @@ bool MultiLogRecordProcessor::Shutdown(std::chrono::microseconds timeout) noexce
115115
auto start_time = std::chrono::system_clock::now();
116116
auto overflow_checker = std::chrono::system_clock::time_point::max();
117117
std::chrono::system_clock::time_point expire_time;
118-
if (std::chrono::duration_cast<std::chrono::system_clock::duration>(overflow_checker -
119-
start_time) <= timeout)
118+
if (std::chrono::duration_cast<std::chrono::microseconds>(overflow_checker - start_time) <=
119+
timeout)
120120
{
121121
expire_time = overflow_checker;
122122
}

0 commit comments

Comments
 (0)