Skip to content

Commit b8c9c6e

Browse files
committed
duration<...>.count() can be various types
1 parent d85ff46 commit b8c9c6e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/datadog/span_data.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ Expected<void> msgpack_encode(std::string& destination, const SpanData& span) {
8989
},
9090
"start", [&](auto& destination) {
9191
msgpack::pack_integer(
92-
destination, std::chrono::duration_cast<std::chrono::nanoseconds>(
92+
destination, std::uint64_t(std::chrono::duration_cast<std::chrono::nanoseconds>(
9393
span.start.wall.time_since_epoch())
94-
.count());
94+
.count()));
9595
return Expected<void>{};
9696
},
9797
"duration", [&](auto& destination) {
9898
msgpack::pack_integer(
9999
destination,
100-
std::chrono::duration_cast<std::chrono::nanoseconds>(span.duration)
101-
.count());
100+
std::uint64_t(std::chrono::duration_cast<std::chrono::nanoseconds>(span.duration)
101+
.count()));
102102
return Expected<void>{};
103103
},
104104
"error", [&](auto& destination) {

0 commit comments

Comments
 (0)