Skip to content

Commit

Permalink
Fix spell error
Browse files Browse the repository at this point in the history
Signed-off-by: owentou <owentou@tencent.com>
  • Loading branch information
owent committed Mar 9, 2022
1 parent 7ede432 commit 659e11f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/include/opentelemetry/common/timestamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ class DurationUtil
std::chrono::duration<Rep, Period> timeout,
std::chrono::duration<Rep, Period> indefinite_value) noexcept
{
// Do not call now() when this duration is max value, now() may have a expemsive cost.
// Do not call now() when this duration is max value, now() may have a expensive cost.
if (timeout == std::chrono::duration<Rep, Period>::max())
{
return indefinite_value;
}

// std::future<T>::wait_for, std::this_thread::sleep_for, and std::condition_variable::wait_for
// mey use steady_clock or system_clock.We need make sure now() + timeout do not overflow.
// may use steady_clock or system_clock.We need make sure now() + timeout do not overflow.
auto max_timeout = std::chrono::duration_cast<std::chrono::duration<Rep, Period>>(
std::chrono::steady_clock::time_point::max() - std::chrono::steady_clock::now());
if (timeout >= max_timeout)
Expand Down

0 comments on commit 659e11f

Please sign in to comment.