MCPcopy Create free account
hub / github.com/Codesire-Deng/co_context / main

Function main

example/timer.cpp:21–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21int main() {
22 io_context ctx;
23 ctx.co_spawn(cycle(1, "1 sec"));
24 ctx.co_spawn(cycle_abs(1, "1 sec [abs]"));
25 ctx.co_spawn(cycle(3, "\t3 sec"));
26 ctx.start();
27 ctx.join();
28 return 0;
29}

Callers

nothing calls this directly

Calls 5

cycleFunction · 0.85
startMethod · 0.80
joinMethod · 0.80
cycle_absFunction · 0.70
co_spawnMethod · 0.45

Tested by

no test coverage detected