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

Function main

example/cpp11/tutorial/timer3/timer.cpp:29–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29int main()
30{
31 boost::asio::io_context io;
32
33 int count = 0;
34 boost::asio::steady_timer t(io, boost::asio::chrono::seconds(1));
35 t.async_wait(std::bind(print,
36 boost::asio::placeholders::error, &t, &count));
37
38 io.run();
39
40 std::cout << "Final count is " << count << std::endl;
41
42 return 0;
43}

Callers

nothing calls this directly

Calls 3

bindFunction · 0.50
async_waitMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected