diff --git a/api/include/opentelemetry/trace/tracer.h b/api/include/opentelemetry/trace/tracer.h index 57761e5f90..e1300776f0 100644 --- a/api/include/opentelemetry/trace/tracer.h +++ b/api/include/opentelemetry/trace/tracer.h @@ -171,7 +171,7 @@ class Tracer void ForceFlush(std::chrono::duration timeout) noexcept { this->ForceFlushWithMicroseconds( - static_cast(std::chrono::duration_cast(timeout))); + static_cast(std::chrono::duration_cast(timeout).count())); } virtual void ForceFlushWithMicroseconds(uint64_t timeout) noexcept = 0; @@ -184,7 +184,7 @@ class Tracer void Close(std::chrono::duration timeout) noexcept { this->CloseWithMicroseconds( - static_cast(std::chrono::duration_cast(timeout))); + static_cast(std::chrono::duration_cast(timeout).count())); } virtual void CloseWithMicroseconds(uint64_t timeout) noexcept = 0;