Lines Matching defs:timeout_ms
67 int Curl_wait_ms(timediff_t timeout_ms)
71 if(!timeout_ms)
73 if(timeout_ms < 0) {
78 delay(timeout_ms);
80 /* prevent overflow, timeout_ms is typecast to ULONG/DWORD. */
82 if(timeout_ms >= ULONG_MAX)
83 timeout_ms = ULONG_MAX-1;
86 Sleep((ULONG)timeout_ms);
89 /* prevent overflow, timeout_ms is typecast to int. */
91 if(timeout_ms > INT_MAX)
92 timeout_ms = INT_MAX;
94 r = poll(NULL, 0, (int)timeout_ms);
98 r = select(0, NULL, NULL, NULL, curlx_mstotv(&pending_tv, timeout_ms));
128 timediff_t timeout_ms) /* milliseconds to wait */
139 return Curl_wait_ms(timeout_ms);
143 ptimeout = curlx_mstotv(&pending_tv, timeout_ms);
192 timediff_t timeout_ms) /* milliseconds to wait */
201 return Curl_wait_ms(timeout_ms);
229 r = Curl_poll(pfd, num, timeout_ms);
272 int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
296 return Curl_wait_ms(timeout_ms);
306 /* prevent overflow, timeout_ms is typecast to int. */
308 if(timeout_ms > INT_MAX)
309 timeout_ms = INT_MAX;
311 if(timeout_ms > 0)
312 pending_ms = (int)timeout_ms;
313 else if(timeout_ms < 0)
365 r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);