fixup comment
This commit is contained in:
parent
6ea435f743
commit
4e74edf8d4
1 changed files with 2 additions and 1 deletions
|
@ -80,7 +80,8 @@ ClientBase::wait_for_service_nanoseconds(std::chrono::nanoseconds timeout)
|
||||||
throw InvalidNodeError();
|
throw InvalidNodeError();
|
||||||
}
|
}
|
||||||
auto event = node_ptr->get_graph_event();
|
auto event = node_ptr->get_graph_event();
|
||||||
// update the time even on the first loop to account for time in first server_is_read()
|
// update the time even on the first loop to account for time spent in the first call
|
||||||
|
// to this->server_is_ready()
|
||||||
std::chrono::nanoseconds time_to_wait = timeout - (std::chrono::steady_clock::now() - start);
|
std::chrono::nanoseconds time_to_wait = timeout - (std::chrono::steady_clock::now() - start);
|
||||||
if (timeout > std::chrono::nanoseconds(0) && time_to_wait < std::chrono::nanoseconds(0)) {
|
if (timeout > std::chrono::nanoseconds(0) && time_to_wait < std::chrono::nanoseconds(0)) {
|
||||||
// Do not allow the time_to_wait to become negative when timeout was originally positive.
|
// Do not allow the time_to_wait to become negative when timeout was originally positive.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue