Mercurial
annotate third_party/libuv/docs/code/idle-basic/main.c @ 258:60a876c4587a
[ui] Add semantic primitive ownership
Build a layered Zenbu token and sizing system, make authored controls use native-underneath primitives, migrate mrjunejune without imposing visual surfaces, and document/enforce HTML ownership in the catalog and wiki.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Wed, 05 Aug 2026 05:25:40 -0700 |
| parents | 948de3f54cea |
| children |
| rev | line source |
|---|---|
| 160 | 1 #include <stdio.h> |
| 2 #include <uv.h> | |
| 3 | |
| 4 int64_t counter = 0; | |
| 5 | |
| 6 void wait_for_a_while(uv_idle_t* handle) { | |
| 7 counter++; | |
| 8 | |
| 9 if (counter >= 10e6) | |
| 10 uv_idle_stop(handle); | |
| 11 } | |
| 12 | |
| 13 int main() { | |
| 14 uv_idle_t idler; | |
| 15 | |
| 16 uv_idle_init(uv_default_loop(), &idler); | |
| 17 uv_idle_start(&idler, wait_for_a_while); | |
| 18 | |
| 19 printf("Idling...\n"); | |
| 20 uv_run(uv_default_loop(), UV_RUN_DEFAULT); | |
| 21 | |
| 22 uv_loop_close(uv_default_loop()); | |
| 23 return 0; | |
| 24 } |