aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-07-28 15:49:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-07-28 15:51:25 +0200
commit4dee50b9c80f9b18d2eb9a1c20bd879abb342302 (patch)
tree7a9c5ddd299e23ad27c7efa6a8759ae3122f31c9 /lib/urldata.h
parent7551e55d6614cddb039602e08f3d7aa302299617 (diff)
timeval: struct curltime is a struct timeval replacement
... to make all libcurl internals able to use the same data types for the struct members. The timeval struct differs subtly on several platforms so it makes it cumbersome to use everywhere. Ref: #1652 Closes #1693
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 41f9408ba..45ad04e0a 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -678,8 +678,8 @@ struct SingleRequest {
100 reply (without a following second response
code) result in a CURLE_GOT_NOTHING error code */
- struct timeval start; /* transfer started at this time */
- struct timeval now; /* current time */
+ struct curltime start; /* transfer started at this time */
+ struct curltime now; /* current time */
bool header; /* incoming data has HTTP header */
enum {
HEADER_NORMAL, /* no bad header at all */
@@ -701,7 +701,7 @@ struct SingleRequest {
Content-Range: header */
int httpcode; /* error code from the 'HTTP/1.? XXX' or
'RTSP/1.? XXX' line */
- struct timeval start100; /* time stamp to wait for the 100 code from */
+ struct curltime start100; /* time stamp to wait for the 100 code from */
enum expect100 exp100; /* expect 100 continue state */
enum upgrade101 upgr101; /* 101 upgrade state */
@@ -1016,8 +1016,8 @@ struct connectdata {
int httpversion; /* the HTTP version*10 reported by the server */
int rtspversion; /* the RTSP version*10 reported by the server */
- struct timeval now; /* "current" time */
- struct timeval created; /* creation time */
+ struct curltime now; /* "current" time */
+ struct curltime created; /* creation time */
curl_socket_t sock[2]; /* two sockets, the second is used for the data
transfer when doing FTP */
curl_socket_t tempsock[2]; /* temporary sockets for happy eyeballs */
@@ -1040,7 +1040,7 @@ struct connectdata {
/* connecttime: when connect() is called on the current IP address. Used to
be able to track when to move on to try next IP - but only when the multi
interface is used. */
- struct timeval connecttime;
+ struct curltime connecttime;
/* The two fields below get set in Curl_connecthost */
int num_addr; /* number of addresses to try to connect to */
time_t timeoutms_per_addr; /* how long time in milliseconds to spend on
@@ -1250,22 +1250,22 @@ struct Progress {
time_t t_starttransfer;
time_t t_redirect;
- struct timeval start;
- struct timeval t_startsingle;
- struct timeval t_startop;
- struct timeval t_acceptdata;
+ struct curltime start;
+ struct curltime t_startsingle;
+ struct curltime t_startop;
+ struct curltime t_acceptdata;
/* upload speed limit */
- struct timeval ul_limit_start;
+ struct curltime ul_limit_start;
curl_off_t ul_limit_size;
/* download speed limit */
- struct timeval dl_limit_start;
+ struct curltime dl_limit_start;
curl_off_t dl_limit_size;
#define CURR_TIME (5+1) /* 6 entries for 5 seconds */
curl_off_t speeder[ CURR_TIME ];
- struct timeval speeder_time[ CURR_TIME ];
+ struct curltime speeder_time[ CURR_TIME ];
int speeder_c;
};
@@ -1360,7 +1360,7 @@ typedef enum {
*/
struct time_node {
struct curl_llist_element list;
- struct timeval time;
+ struct curltime time;
expire_id eid;
};
@@ -1375,7 +1375,7 @@ struct UrlState {
bool multi_owned_by_easy;
/* buffers to store authentication data in, as parsed from input options */
- struct timeval keeps_speed; /* for the progress meter really */
+ struct curltime keeps_speed; /* for the progress meter really */
struct connectdata *lastconnect; /* The last connection, NULL if undefined */
@@ -1429,7 +1429,7 @@ struct UrlState {
#if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE *engine;
#endif /* USE_OPENSSL */
- struct timeval expiretime; /* set this with Curl_expire() only */
+ struct curltime expiretime; /* set this with Curl_expire() only */
struct Curl_tree timenode; /* for the splay stuff */
struct curl_llist timeoutlist; /* list of pending timeouts */
struct time_node expires[EXPIRE_LAST]; /* nodes for each expire type */