We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConcurrentQueue define as : moodycamel::ConcurrentQueue<uint64_t> clocks_;
moodycamel::ConcurrentQueue<uint64_t> clocks_;
Enqueue thread:
while (curr_clock_time < end_clock_time && !stop_) { SINFO("ENQUEUE CLOCK: {}", curr_clock_time); while (!clocks_.try_enqueue(curr_clock_time)) { std::this_thread::sleep_for(std::chrono::nanoseconds(options_.precision)); } curr_clock_time += step; }
Dequeue thread:
while (timestamp > clock_time && clocks_.size_approx() > 0) { auto msg = rosgraph_msgs::msg::Clock(); msg.clock.sec = static_cast<int32_t>(clock_time / 1e9); msg.clock.nanosec = static_cast<uint32_t>(clock_time % static_cast<uint64_t>(1e9)); SINFO("DEQUEUE CLOCK: {}", clock_time); clock_writer_->publish(msg); while (!clocks_.try_dequeue(clock_time) && clocks_.size_approx() > 0) { std::this_thread::sleep_for(std::chrono::nanoseconds(options_.precision)); } }
First clock_time get by try_dequeue always is 1.
The text was updated successfully, but these errors were encountered:
Well, what value is first enqueued? How are you inspecting the first value dequeued?
Sorry, something went wrong.
No branches or pull requests
ConcurrentQueue define as :
moodycamel::ConcurrentQueue<uint64_t> clocks_;
Enqueue thread:
Dequeue thread:
First clock_time get by try_dequeue always is 1.
The text was updated successfully, but these errors were encountered: