mirror of
https://github.com/curl/curl.git
synced 2026-07-28 15:03:06 +03:00
time: rename Curl_tvnow to Curl_now
... since the 'tv' stood for timeval and this function does not return a timeval struct anymore. Also, cleaned up the Curl_timediff*() functions to avoid typecasts and clean up the descriptive comments. Closes #2011
This commit is contained in:
parent
1d72b5b891
commit
5d543fe906
23 changed files with 73 additions and 83 deletions
12
lib/multi.c
12
lib/multi.c
|
|
@ -2147,7 +2147,7 @@ CURLMcode curl_multi_perform(struct Curl_multi *multi, int *running_handles)
|
|||
struct Curl_easy *data;
|
||||
CURLMcode returncode = CURLM_OK;
|
||||
struct Curl_tree *t;
|
||||
struct curltime now = Curl_tvnow();
|
||||
struct curltime now = Curl_now();
|
||||
|
||||
if(!GOOD_MULTI_HANDLE(multi))
|
||||
return CURLM_BAD_HANDLE;
|
||||
|
|
@ -2553,7 +2553,7 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
|
|||
CURLMcode result = CURLM_OK;
|
||||
struct Curl_easy *data = NULL;
|
||||
struct Curl_tree *t;
|
||||
struct curltime now = Curl_tvnow();
|
||||
struct curltime now = Curl_now();
|
||||
|
||||
if(checkall) {
|
||||
/* *perform() deals with running_handles on its own */
|
||||
|
|
@ -2629,8 +2629,8 @@ static CURLMcode multi_socket(struct Curl_multi *multi,
|
|||
|
||||
data = NULL; /* set data to NULL again to avoid calling
|
||||
multi_runsingle() in case there's no need to */
|
||||
now = Curl_tvnow(); /* get a newer time since the multi_runsingle() loop
|
||||
may have taken some time */
|
||||
now = Curl_now(); /* get a newer time since the multi_runsingle() loop
|
||||
may have taken some time */
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -2783,7 +2783,7 @@ static CURLMcode multi_timeout(struct Curl_multi *multi,
|
|||
|
||||
if(multi->timetree) {
|
||||
/* we have a tree of expire times */
|
||||
struct curltime now = Curl_tvnow();
|
||||
struct curltime now = Curl_now();
|
||||
|
||||
/* splay the lowest to the bottom */
|
||||
multi->timetree = Curl_splay(tv_zero, multi->timetree);
|
||||
|
|
@ -2949,7 +2949,7 @@ void Curl_expire(struct Curl_easy *data, time_t milli, expire_id id)
|
|||
|
||||
DEBUGASSERT(id < EXPIRE_LAST);
|
||||
|
||||
set = Curl_tvnow();
|
||||
set = Curl_now();
|
||||
set.tv_sec += milli/1000;
|
||||
set.tv_usec += (unsigned int)(milli%1000)*1000;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue