MCPcopy Create free account
hub / github.com/boostorg/asio / main

Function main

example/cpp14/deferred/deferred_6.cpp:54–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54int main()
55{
56 boost::asio::io_context ctx;
57
58 boost::asio::steady_timer timer(ctx);
59 timer.expires_after(std::chrono::seconds(1));
60
61 async_wait_twice(
62 timer,
63 [](int result)
64 {
65 std::cout << "result is " << result << "\n";
66 }
67 );
68
69 // Uncomment the following line to trigger an error in async_wait_twice.
70 //timer.cancel();
71
72 ctx.run();
73
74 return 0;
75}

Callers

nothing calls this directly

Calls 3

async_wait_twiceFunction · 0.70
expires_afterMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected