Skip to content

Commit

Permalink
Merge pull request #472 from leapmotion/fix-android
Browse files Browse the repository at this point in the history
Add autoboost/stl interoperability
  • Loading branch information
gtremper committed Mar 27, 2015
2 parents fb3f937 + b849711 commit 18b0cb4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/autoboost/autoboost/thread/future.hpp
Expand Up @@ -57,6 +57,7 @@
#include <autoboost/thread/future_error_code.hpp>
#ifdef AUTOBOOST_THREAD_USES_CHRONO
#include <autoboost/chrono/system_clocks.hpp>
#include <chrono>
#endif

#if defined AUTOBOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
Expand Down Expand Up @@ -1391,8 +1392,14 @@ namespace autoboost
wait_for(const chrono::duration<Rep, Period>& rel_time) const
{
return wait_until(chrono::steady_clock::now() + rel_time);
}

template<class Rep, class Period>
future_status wait_for(const std::chrono::duration<Rep, Period>& rel_time) const
{
return wait_for(chrono::duration<Rep, autoboost::ratio<Period::num, Period::den>>(rel_time.count()));
}

template <class Clock, class Duration>
future_status
wait_until(const chrono::time_point<Clock, Duration>& abs_time) const
Expand Down

0 comments on commit 18b0cb4

Please sign in to comment.