libcoro  1.0
Coroutine support library for C++20

◆ sleep_for()

template<typename CondVar >
template<typename A , typename B >
future<void> coro::scheduler_t< CondVar >::sleep_for ( std::chrono::duration< A, B >  dur,
ident_t  ident = nullptr 
)
inline

sleep for specified duration

Parameters
durduration
identoptional identification. You can use any pointer as identification. The pointer is dereferrenced
Returns
future which becomes resolved after specified duration. You just need to co_await on it

Definition at line 84 of file scheduler.h.