Home
last modified time | relevance | path

Searched refs:timeout (Results 1 – 25 of 41) sorted by relevance

12

/libuv/src/unix/
H A Dposix-poll.c182 assert(timeout >= -1); in uv__io_poll()
188 timeout = 0; in uv__io_poll()
201 if (timeout != 0) in uv__io_poll()
228 if (timeout == -1) in uv__io_poll()
230 if (timeout > 0) in uv__io_poll()
247 if (timeout == -1) in uv__io_poll()
250 if (timeout == 0) in uv__io_poll()
327 if (timeout == 0) in uv__io_poll()
330 if (timeout == -1) in uv__io_poll()
334 assert(timeout > 0); in uv__io_poll()
[all …]
H A Dkqueue.c259 assert(timeout >= -1); in uv__io_poll()
265 user_timeout = timeout; in uv__io_poll()
266 timeout = 0; in uv__io_poll()
275 if (timeout != 0) in uv__io_poll()
278 if (timeout != -1) { in uv__io_poll()
303 assert(timeout != -1); in uv__io_poll()
450 timeout = 0; in uv__io_poll()
457 if (timeout == 0) in uv__io_poll()
460 if (timeout == -1) in uv__io_poll()
463 assert(timeout > 0); in uv__io_poll()
[all …]
H A Dsunos.c200 assert(timeout >= -1); in uv__io_poll()
207 timeout = 0; in uv__io_poll()
216 if (timeout != 0) in uv__io_poll()
219 if (timeout != -1) { in uv__io_poll()
266 if (timeout == 0) in uv__io_poll()
344 timeout = 0; in uv__io_poll()
355 if (timeout == 0) in uv__io_poll()
358 if (timeout == -1) in uv__io_poll()
368 timeout -= diff; in uv__io_poll()
453 timespec_t timeout; in uv__fs_event_read() local
[all …]
H A Dos390.c878 assert(timeout >= -1); in uv__io_poll()
888 timeout = 0; in uv__io_poll()
898 if (timeout != 0) in uv__io_poll()
927 if (timeout == -1) in uv__io_poll()
930 if (timeout == 0) in uv__io_poll()
949 if (timeout == -1) in uv__io_poll()
952 if (timeout == 0) in uv__io_poll()
1038 timeout = 0; in uv__io_poll()
1044 if (timeout == 0) in uv__io_poll()
1047 if (timeout == -1) in uv__io_poll()
[all …]
H A Daix.c219 assert(timeout >= -1); in uv__io_poll()
226 timeout = 0; in uv__io_poll()
235 if (timeout != 0) in uv__io_poll()
261 if (timeout > 0) in uv__io_poll()
279 if (timeout == -1) in uv__io_poll()
282 if (timeout == 0) in uv__io_poll()
354 timeout = 0; in uv__io_poll()
360 if (timeout == 0) in uv__io_poll()
363 if (timeout == -1) in uv__io_poll()
367 assert(timeout > 0); in uv__io_poll()
[all …]
H A Dthread.c820 int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) { in uv_cond_timedwait() argument
828 ts.tv_sec = timeout / NANOSEC; in uv_cond_timedwait()
829 ts.tv_nsec = timeout % NANOSEC; in uv_cond_timedwait()
835 timeout += tv.tv_sec * NANOSEC + tv.tv_usec * 1e3; in uv_cond_timedwait()
837 timeout += uv__hrtime(UV_CLOCK_PRECISE); in uv_cond_timedwait()
839 ts.tv_sec = timeout / NANOSEC; in uv_cond_timedwait()
840 ts.tv_nsec = timeout % NANOSEC; in uv_cond_timedwait()
H A Dlinux.c1387 assert(timeout >= -1); in uv__io_poll()
1390 real_timeout = timeout; in uv__io_poll()
1394 user_timeout = timeout; in uv__io_poll()
1395 timeout = 0; in uv__io_poll()
1455 if (timeout != 0) in uv__io_poll()
1476 assert(timeout != -1); in uv__io_poll()
1594 timeout = 0; in uv__io_poll()
1601 if (timeout == 0) in uv__io_poll()
1604 if (timeout == -1) in uv__io_poll()
1607 assert(timeout > 0); in uv__io_poll()
[all …]
H A Dos390-syscalls.h57 int epoll_wait(uv__os390_epoll* ep, struct epoll_event *events, int maxevents, int timeout);
H A Dcore.c426 int timeout; in uv_run() local
452 timeout = 0; in uv_run()
454 timeout = uv__backend_timeout(loop); in uv_run()
458 uv__io_poll(loop, timeout); in uv_run()
1793 struct timespec timeout; in uv_sleep() local
1796 timeout.tv_sec = msec / 1000; in uv_sleep()
1797 timeout.tv_nsec = (msec % 1000) * 1000 * 1000; in uv_sleep()
1800 rc = nanosleep(&timeout, &timeout); in uv_sleep()
/libuv/src/
H A Dtimer.c46 if (a->timeout < b->timeout) in timer_less_than()
48 if (b->timeout < a->timeout) in timer_less_than()
61 handle->timeout = 0; in uv_timer_init()
70 uint64_t timeout, in uv_timer_start() argument
80 if (clamped_timeout < timeout) in uv_timer_start()
84 handle->timeout = clamped_timeout; in uv_timer_start()
137 if (handle->loop->time >= handle->timeout) in uv_timer_get_due_in()
140 return handle->timeout - handle->loop->time; in uv_timer_get_due_in()
154 if (handle->timeout <= loop->time) in uv__next_timeout()
157 diff = handle->timeout - loop->time; in uv__next_timeout()
[all …]
/libuv/src/win/
H A Dcore.c442 user_timeout = timeout; in uv__poll_wine()
443 timeout = 0; in uv__poll_wine()
452 if (timeout != 0) in uv__poll_wine()
470 timeout = user_timeout; in uv__poll_wine()
495 } else if (timeout > 0) { in uv__poll_wine()
535 user_timeout = timeout; in uv__poll()
536 timeout = 0; in uv__poll()
542 actual_timeout = timeout; in uv__poll()
547 if (timeout != 0) in uv__poll()
620 DWORD timeout; in uv_run() local
[all …]
H A Dpoll.c275 struct timeval timeout; in uv__slow_poll_thread_proc() local
299 timeout.tv_sec = 3 * 60; in uv__slow_poll_thread_proc()
300 timeout.tv_usec = 0; in uv__slow_poll_thread_proc()
302 r = select(1, (fd_set*) &rfds, (fd_set*) &wfds, (fd_set*) &efds, &timeout); in uv__slow_poll_thread_proc()
/libuv/test/
H A Dbenchmark-queue-work.c53 int timeout; in BENCHMARK_IMPL() local
56 timeout = 5000; in BENCHMARK_IMPL()
59 ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, timeout, 0)); in BENCHMARK_IMPL()
66 timeout / 1000., in BENCHMARK_IMPL()
67 fmt(&fmtbuf[1], events / (timeout / 1000.))); in BENCHMARK_IMPL()
H A Dbenchmark-million-async.c83 int timeout; in BENCHMARK_IMPL() local
87 timeout = 5000; in BENCHMARK_IMPL()
101 ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, timeout, 0)); in BENCHMARK_IMPL()
106 timeout / 1000., in BENCHMARK_IMPL()
107 fmt(&fmtbuf[1], container->async_events / (timeout / 1000.)), in BENCHMARK_IMPL()
H A Dbenchmark-million-timers.c48 int timeout; in BENCHMARK_IMPL() local
55 timeout = 0; in BENCHMARK_IMPL()
59 if (i % 1000 == 0) timeout++; in BENCHMARK_IMPL()
61 ASSERT_OK(uv_timer_start(timers + i, timer_cb, timeout, 0)); in BENCHMARK_IMPL()
H A Drunner.h49 int timeout; member
69 #define TEST_ENTRY_CUSTOM(name, is_helper, show_output, timeout) \ argument
70 { #name, #name, &run_test_##name, is_helper, show_output, timeout },
144 int process_wait(process_info_t *vec, int n, int timeout);
H A Dtest-metrics.c54 const uint64_t timeout = 1000; in TEST_IMPL() local
64 ASSERT_OK(uv_timer_start(&timer, timer_spin_cb, timeout, 0)); in TEST_IMPL()
72 ASSERT_LE(idle_time, (timeout + 500) * UV_NS_TO_MS); in TEST_IMPL()
73 ASSERT_GE(idle_time, (timeout - 500) * UV_NS_TO_MS); in TEST_IMPL()
81 const uint64_t timeout = 1000; in metrics_routine_cb() local
93 ASSERT_OK(uv_timer_start(&timer, timer_spin_cb, timeout, 0)); in metrics_routine_cb()
104 ASSERT_GE(idle_time, (timeout - 500) * UV_NS_TO_MS); in metrics_routine_cb()
H A Dtest-udp-ipv6.c36 || (uv_timer_t*)(handle) == &timeout, 0)
45 static uv_timer_t timeout; variable
141 uv_close((uv_handle_t*)&timeout, close_cb); in timeout_cb()
204 r = uv_timer_init(uv_default_loop(), &timeout); in do_test()
207 r = uv_timer_start(&timeout, timeout_cb, 500, 0); in do_test()
H A Drunner-unix.c236 int process_wait(process_info_t* vec, int n, int timeout) { in process_wait() argument
255 if (timeout == -1) { in process_wait()
308 if (elapsed_ms >= (unsigned) timeout) in process_wait()
311 tv.tv_sec = (timeout - elapsed_ms) / 1000; in process_wait()
312 tv.tv_usec = (timeout - elapsed_ms) % 1000 * 1000; in process_wait()
H A Dbenchmark-udp-pummel.c150 unsigned long timeout) { in pummel() argument
164 if (timeout) { in pummel()
166 ASSERT_OK(uv_timer_start(&timer_handle, timeout_cb, timeout, 0)); in pummel()
H A Dtest-condvar.c231 uint64_t timeout; in TEST_IMPL() local
233 timeout = 100 * 1000 * 1000; /* 100 ms in ns */ in TEST_IMPL()
241 ASSERT_EQ(UV_ETIMEDOUT, uv_cond_timedwait(&wc.cond, &wc.mutex, timeout)); in TEST_IMPL()
H A Drunner-win.c179 int process_wait(process_info_t *vec, int n, int timeout) { in process_wait() argument
193 if (timeout >= 0) { in process_wait()
194 timeout_api = (DWORD)timeout; in process_wait()
/libuv/docs/src/
H A Dtimer.rst37 .. c:function:: int uv_timer_start(uv_timer_t* handle, uv_timer_cb cb, uint64_t timeout, uint64_t r…
39 Start the timer. `timeout` and `repeat` are in milliseconds.
41 If `timeout` is zero, the callback fires on the next event loop iteration.
42 If `repeat` is non-zero, the callback fires first after `timeout`
57 as the timeout. If the timer has never been started before it returns
75 then the old repeat value will have been used to schedule the next timeout.
H A Ddesign.rst82 #. Poll timeout is calculated. Before blocking for I/O the loop calculates for how long it should
83 block. These are the rules when calculating the timeout:
85 * If the loop was run with the ``UV_RUN_NOWAIT`` flag, the timeout is 0.
86 * If the loop is going to be stopped (:c:func:`uv_stop` was called), the timeout is 0.
87 * If there are no active handles or requests, the timeout is 0.
88 * If there are any idle handles active, the timeout is 0.
89 * If there are any handles pending to be closed, the timeout is 0.
90 * If none of the above cases matches, the timeout of the closest timer is taken, or
/libuv/docs/code/uvwget/
H A Dmain.c9 uv_timer_t timeout; variable
82 uv_timer_stop(&timeout); in curl_perform()
106 uv_timer_start(&timeout, on_timeout, timeout_ms, 0); in start_timeout()
153 uv_timer_init(loop, &timeout); in main()

Completed in 72 milliseconds

12