fixup comment

This commit is contained in:
William Woodall 2016-09-15 15:41:48 -07:00 committed by GitHub
parent 6ea435f743
commit 4e74edf8d4

View file

@ -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.