Lines Matching refs:tv
33 * NULL IF tv is NULL or ms < 0 (eg. no timeout -> blocking select)
34 * tv with 0 in both fields IF ms == 0 (eg. 0ms timeout -> polling select)
35 * tv with converted fields IF ms > 0 (eg. >0ms timeout -> waiting select)
37 struct timeval *curlx_mstotv(struct timeval *tv, timediff_t ms)
39 if(!tv)
54 tv->tv_sec = (time_t)tv_sec;
55 tv->tv_usec = (suseconds_t)tv_usec;
62 tv->tv_sec = (long)tv_sec;
63 tv->tv_usec = (long)tv_usec;
70 tv->tv_sec = (int)tv_sec;
71 tv->tv_usec = (int)tv_usec;
75 tv->tv_sec = 0;
76 tv->tv_usec = 0;
79 return tv;
85 timediff_t curlx_tvtoms(struct timeval *tv)
87 return (tv->tv_sec*1000) + (timediff_t)(((double)tv->tv_usec)/1000.0);