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

Function main

example/cpp14/deferred/deferred_5.cpp:45–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45int main()
46{
47 boost::asio::io_context ctx;
48
49 boost::asio::steady_timer timer(ctx);
50 timer.expires_after(std::chrono::seconds(1));
51
52 async_wait_twice(
53 timer,
54 [](int result)
55 {
56 std::cout << "result is " << result << "\n";
57 }
58 );
59
60 // Uncomment the following line to trigger an error in async_wait_twice.
61 //timer.cancel();
62
63 ctx.run();
64
65 return 0;
66}

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