Skip to content

Commit

Permalink
Merge pull request PointCloudLibrary#3100 from SunBlack/std_wait_for
Browse files Browse the repository at this point in the history
Fix: No member named 'timed_wait' in 'std::condition_variable'
  • Loading branch information
SergioRAgostinho authored May 25, 2019
2 parents 0a5baca + 521d0db commit 83a8df2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class PeoplePCDApp
capture_.start ();
while (!exit_ && !final_view_.wasStopped())
{
bool has_data = data_ready_cond_.timed_wait(lock, boost::posix_time::millisec(100));
bool has_data = (data_ready_cond_.wait_for(lock, 100ms) == std::cv_status::no_timeout);
if(has_data)
{
SampledScopeTime fps(time_ms_);
Expand Down
2 changes: 1 addition & 1 deletion gpu/kinfu/tools/kinfu_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ struct KinFuApp
{
if (triggered_capture)
capture_.start(); // Triggers new frame
bool has_data = data_ready_cond_.timed_wait (lock, boost::posix_time::millisec(100));
bool has_data = (data_ready_cond_.wait_for(lock, 100ms) == std::cv_status::no_timeout);

try { this->execute (depth_, rgb24_, has_data); }
catch (const std::bad_alloc& /*e*/) { cout << "Bad alloc" << endl; break; }
Expand Down
2 changes: 1 addition & 1 deletion gpu/kinfu_large_scale/tools/kinfuLS_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ struct KinFuLSApp
if (triggered_capture)
capture_.start(); // Triggers new frame

bool has_data = data_ready_cond_.timed_wait (lock, boost::posix_time::millisec(100));
bool has_data = (data_ready_cond_.wait_for(lock, 100ms) == std::cv_status::no_timeout);

try { this->execute (depth_, rgb24_, has_data); }
catch (const std::bad_alloc& /*e*/) { cout << "Bad alloc" << endl; break; }
Expand Down
2 changes: 1 addition & 1 deletion gpu/people/tools/people_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class PeoplePCDApp
capture_.start ();
while (!exit_ && !final_view_.wasStopped())
{
bool has_data = data_ready_cond_.timed_wait(lock, boost::posix_time::millisec(100));
bool has_data = (data_ready_cond_.wait_for(lock, 100ms) == std::cv_status::no_timeout);
if(has_data)
{
SampledScopeTime fps(time_ms_);
Expand Down

0 comments on commit 83a8df2

Please sign in to comment.