Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
A helper function—for use within a coroutine—that returns control to the caller, and then resumes execution on a thread pool thread after a delay.
For more info, see Concurrency and asynchronous operations.
Syntax
inline auto resume_after(winrt::Windows::Foundation::TimeSpan duration) noexcept;
Parameters
duration
The duration of the delay.
Return value
An object that you can co_await.
Remarks
You can use the functions and operators in the std::chrono and std::literals::chrono_literals namespaces to create TimeSpan values conveniently.
co_await winrt::resume_after(std::chrono::milliseconds(250));
using namespace std::literals::chrono_literals;
co_await winrt::resume_after(250ms);
Requirements
Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)
Namespace: winrt
Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)