Home
last modified time | relevance | path

Searched refs:timer (Results 1 – 25 of 37) sorted by relevance

12

/libuv/test/
H A Dtest-active.c45 uv_timer_t timer; in TEST_IMPL() local
47 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL()
51 ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); in TEST_IMPL()
52 ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); in TEST_IMPL()
54 r = uv_timer_start(&timer, timer_cb, 1000, 0); in TEST_IMPL()
58 ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); in TEST_IMPL()
60 r = uv_timer_stop(&timer); in TEST_IMPL()
63 ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); in TEST_IMPL()
66 r = uv_timer_start(&timer, timer_cb, 1000, 0); in TEST_IMPL()
72 uv_close((uv_handle_t*) &timer, close_cb); in TEST_IMPL()
[all …]
H A Dtest-tcp-connect-timeout.c32 static uv_timer_t timer; variable
48 ASSERT_PTR_EQ(handle, &timer); in timer_cb()
50 uv_close((uv_handle_t*)&timer, close_cb); in timer_cb()
55 ASSERT(handle == (uv_handle_t*)&conn || handle == (uv_handle_t*)&timer); in close_cb()
69 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL()
72 r = uv_timer_start(&timer, timer_cb, 50, 0); in TEST_IMPL()
135 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL()
139 r = uv_timer_start(&timer, timer_cb, 1000, 0); in TEST_IMPL()
173 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL()
177 r = uv_timer_start(&timer, timer_cb, 1000, 0); in TEST_IMPL()
H A Dtest-fs-event.c39 static uv_timer_t timer; variable
355 touch_file((char*) timer->data); in timer_cb_touch()
419 r = uv_timer_init(loop, &timer); in TEST_IMPL()
465 r = uv_timer_init(loop, &timer); in TEST_IMPL()
655 uv_timer_t timer; in TEST_IMPL() local
659 timer.data = watchers; in TEST_IMPL()
677 uv_timer_t timer; in TEST_IMPL() local
706 timer.data = "watch_file"; in TEST_IMPL()
848 uv_timer_t timer; in TEST_IMPL() local
1203 uv_timer_t timer; in TEST_IMPL() local
[all …]
H A Dtest-walk-handles.c30 static uv_timer_t timer; variable
36 if (handle == (uv_handle_t*)&timer) { in walk_cb()
45 ASSERT_PTR_EQ(handle, &timer); in timer_cb()
58 r = uv_timer_init(loop, &timer); in TEST_IMPL()
61 r = uv_timer_start(&timer, timer_cb, 1, 0); in TEST_IMPL()
H A Dtest-loop-time.c37 static void cb(uv_timer_t* timer) { in cb() argument
38 uv_close((uv_handle_t*)timer, NULL); in cb()
43 uv_timer_t timer; in TEST_IMPL() local
53 r = uv_timer_init(loop, &timer); in TEST_IMPL()
59 r = uv_timer_start(&timer, cb, 1000, 0); /* 1 sec */ in TEST_IMPL()
H A Dtest-metrics.c55 uv_timer_t timer; in TEST_IMPL() local
60 timer.data = &cntr; in TEST_IMPL()
63 ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); in TEST_IMPL()
64 ASSERT_OK(uv_timer_start(&timer, timer_spin_cb, timeout, 0)); in TEST_IMPL()
83 uv_timer_t timer; in metrics_routine_cb() local
88 timer.data = &cntr; in metrics_routine_cb()
92 ASSERT_OK(uv_timer_init(&loop, &timer)); in metrics_routine_cb()
134 uv_timer_t timer; in TEST_IMPL() local
138 timer.data = &cntr; in TEST_IMPL()
140 ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); in TEST_IMPL()
[all …]
H A Dtest-tcp-close-after-read-timeout.c28 static uv_timer_t timer; variable
53 r = uv_timer_start(&timer, on_client_timeout, 1000, 0); in on_client_connect()
75 ASSERT_PTR_EQ(handle, &timer); in on_client_timeout()
79 uv_close((uv_handle_t*) &timer, on_close); in on_client_timeout()
117 handle == (uv_handle_t*) &timer, 0); in on_close()
169 r = uv_timer_init(loop, &timer); in TEST_IMPL()
H A Dtest-shutdown-eof.c27 static uv_timer_t timer; variable
127 ASSERT_PTR_EQ(handle, (uv_handle_t*) &timer); in timer_close_cb()
133 ASSERT_PTR_EQ(handle, &timer); in timer_cb()
160 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL()
163 uv_timer_start(&timer, timer_cb, 100, 0); in TEST_IMPL()
H A Dtest-tcp-shutdown-after-write.c29 static uv_timer_t timer; variable
45 else if (handle == (uv_handle_t*)&timer) in close_cb()
112 r = uv_timer_init(loop, &timer); in TEST_IMPL()
115 r = uv_timer_start(&timer, timer_cb, 125, 0); in TEST_IMPL()
H A Dtest-tcp-reuseport.c83 static void ticktack(uv_timer_t* timer) { in ticktack() argument
84 ASSERT(timer == &thread_timer_handle1 || timer == &thread_timer_handle2); in ticktack()
94 uv_close((uv_handle_t*) timer, NULL); in ticktack()
95 if (timer->loop == thread_loop1) in ticktack()
97 if (timer->loop == thread_loop2) in ticktack()
H A Dtest-callback-stack.c34 static uv_timer_t timer; variable
108 ASSERT_PTR_EQ(handle, &timer); in timer_cb()
138 r = uv_timer_init(uv_default_loop(), &timer); in write_cb()
140 r = uv_timer_start(&timer, timer_cb, 500, 0); in write_cb()
H A Dtest-fork.c40 static void timer_cb(uv_timer_t* timer) { in timer_cb() argument
42 uv_close((uv_handle_t*) timer, NULL); in timer_cb()
459 static void timer_cb_touch(uv_timer_t* timer) { in timer_cb_touch() argument
460 uv_close((uv_handle_t*)timer, NULL); in timer_cb_touch()
485 uv_timer_t timer; in assert_watch_file_current_dir() local
503 r = uv_timer_init(loop, &timer); in assert_watch_file_current_dir()
506 r = uv_timer_start(&timer, timer_cb_touch, 100, 0); in assert_watch_file_current_dir()
622 uv_timer_t timer; in TEST_IMPL() local
642 r = uv_timer_init(loop, &timer); in TEST_IMPL()
659 r = uv_timer_start(&timer, timer_cb_touch, 100, 0); in TEST_IMPL()
H A Dtest-connection-fail.c34 static uv_timer_t timer; variable
82 uv_timer_start(&timer, timer_cb, 100, 0); in on_connect_without_close()
151 r = uv_timer_init(uv_default_loop(), &timer); in TEST_IMPL()
H A Dtest-udp-send-unreachable.c34 static uv_timer_t timer; variable
97 ASSERT_PTR_EQ(h, &timer); in timer_cb()
122 r = uv_timer_init( uv_default_loop(), &timer ); in TEST_IMPL()
125 r = uv_timer_start( &timer, timer_cb, 1000, 0 ); in TEST_IMPL()
H A Dtest-tcp-write-queue-order.c31 static uv_timer_t timer; variable
92 ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); in connection_cb()
93 ASSERT_OK(uv_timer_start(&timer, timer_cb, 1000, 0)); in connection_cb()
H A Dtest-default-loop-close.c29 static void timer_cb(uv_timer_t* timer) { in timer_cb() argument
31 uv_close((uv_handle_t*) timer, NULL); in timer_cb()
H A Dtest-queue-foreach-delete.c134 static uv_timer_t timer; variable
184 r = uv_timer_init(loop, &timer); in TEST_IMPL()
187 r = uv_timer_start(&timer, helper_timer_cb, 0, 0); in TEST_IMPL()
H A Dtest-timer.c115 TEST_IMPL(timer) { in TEST_IMPL() argument
254 uv_timer_t timer; in TEST_IMPL() local
258 ASSERT_OK(uv_timer_init(loop, &timer)); in TEST_IMPL()
259 ASSERT_OK(uv_timer_start(&timer, zero_timeout_cb, 0, 0)); in TEST_IMPL()
262 uv_close((uv_handle_t*) &timer, NULL); in TEST_IMPL()
H A Dtest-poll.c76 static void delay_timer_cb(uv_timer_t* timer);
443 static void delay_timer_cb(uv_timer_t* timer) { argument
444 connection_context_t* context = (connection_context_t*) timer->data;
448 ASSERT_OK(uv_is_active((uv_handle_t*) timer));
/libuv/docs/src/
H A Dtimer.rst39 Start the timer. `timeout` and `repeat` are in milliseconds.
48 If the timer is already active, it is simply updated.
52 Stop the timer, the callback will not be called anymore.
56 Stop the timer, and if it is repeating restart it using the repeat value
57 as the timeout. If the timer has never been started before it returns
62 Set the repeat interval value in milliseconds. The timer will be scheduled
64 duration, and will follow normal timer semantics in the case of a
67 For example, if a 50ms repeating timer first runs for 17ms, it will be
69 33ms following the first timer callback, then the callback will run as soon
79 Get the timer repeat value.
[all …]
H A Dapi.rst14 timer
/libuv/src/
H A Dfs-poll.c53 static void timer_cb(uv_timer_t* timer);
172 static void timer_cb(uv_timer_t* timer) { in timer_cb() argument
175 ctx = container_of(timer, struct poll_ctx, timer_handle); in timer_cb()
234 static void timer_close_cb(uv_handle_t* timer) { in timer_close_cb() argument
240 ctx = container_of(timer, struct poll_ctx, timer_handle); in timer_close_cb()
/libuv/docs/src/guide/
H A Dutilities.rst12 Timers invoke the callback after a certain time has elapsed since the timer was
33 to stop the timer. This can be used safely from within the callback as well.
37 uv_timer_set_repeat(uv_timer_t *timer, int64_t repeat);
40 a timer callback, it means:
42 * If the timer was non-repeating, the timer has already been stopped. Use
44 * If the timer is repeating, the next timeout has already been scheduled, so
54 old ``repeat`` value. If the timer hasn't been started it fails (error code
57 An actual timer example is in the :ref:`reference count section
88 .. rubric:: ref-timer/main.c
89 .. literalinclude:: ../../code/ref-timer/main.c
[all …]
/libuv/docs/code/
H A DCMakeLists.txt21 ref-timer
/libuv/
H A DMakefile.am43 src/timer.c \
300 test/test-timer-again.c \
301 test/test-timer-from-check.c \
302 test/test-timer.c \

Completed in 62 milliseconds

12