Sha256: 8656f0722eea23ce25bd66695b104fc8f04c723fe3056fa56319f89a4a91ab7c

Contents?: true

Size: 430 Bytes

Versions: 15

Compression:

Stored size: 430 Bytes

Contents

#include <stdio.h>
#include <uv.h>

int64_t counter = 0;

void wait_for_a_while(uv_idle_t* handle) {
    counter++;

    if (counter >= 10e6)
        uv_idle_stop(handle);
}

int main() {
    uv_idle_t idler;

    uv_idle_init(uv_default_loop(), &idler);
    uv_idle_start(&idler, wait_for_a_while);

    printf("Idling...\n");
    uv_run(uv_default_loop(), UV_RUN_DEFAULT);

    uv_loop_close(uv_default_loop());
    return 0;
}

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
mt-libuv-4.1.04 ext/libuv/docs/code/idle-basic/main.c
mt-libuv-4.1.03 ext/libuv/docs/code/idle-basic/main.c
mt-libuv-4.1.02 ext/libuv/docs/code/idle-basic/main.c
libuv-4.0.9 ext/libuv/docs/code/idle-basic/main.c
libuv-4.0.2 ext/libuv/docs/code/idle-basic/main.c
libuv-4.0.1 ext/libuv/docs/code/idle-basic/main.c
libuv-4.0.0 ext/libuv/docs/code/idle-basic/main.c
libuv-3.3.0 ext/libuv/docs/code/idle-basic/main.c
libuv-3.2.4 ext/libuv/docs/code/idle-basic/main.c
libuv-3.2.3 ext/libuv/docs/code/idle-basic/main.c
libuv-3.2.2 ext/libuv/docs/code/idle-basic/main.c
libuv-3.2.1 ext/libuv/docs/code/idle-basic/main.c
libuv-3.2.0 ext/libuv/docs/code/idle-basic/main.c
libuv-3.1.9 ext/libuv/docs/code/idle-basic/main.c
libuv-3.1.8 ext/libuv/docs/code/idle-basic/main.c