completion_future::wait_for Method
Blocks until the associated asynchronous operation completes or the time that's specified by _Rel_time has elapsed.
template <
class _Rep,
class _Period
>
std::future_status::future_status wait_for(
const std::chrono::duration<_Rep, _Period>& _Rel_time
) const;
Parameters
_Rep
An arithmetic type that represents the number of ticks._Period
A std::ratio that represents the number of seconds that elapse per tick._Rel_time
The maximum amount of time to wait for the operation to complete.
Return Value
Returns:
std::future_status::deferred if the associated asynchronous operation is not running.
std::future_status::ready if the associated asynchronous operation is finished.
std::future_status::timeout if the specified time period has elapsed.
Requirements
Header: amprt.h
Namespace: concurrency