1CURLINFO_TOTAL_TIME_T(3)   curl_easy_getinfo options  CURLINFO_TOTAL_TIME_T(3)
2
3
4

NAME

6       CURLINFO_TOTAL_TIME_T   -  get  total  time  of  previous  transfer  in
7       microseconds
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode   curl_easy_getinfo(CURL    *handle,    CURLINFO_TOTAL_TIME_T,
13       curl_off_t *timep);
14

DESCRIPTION

16       Pass  a  pointer to a curl_off_t to receive the total time in microsec‐
17       onds for the previous transfer, including name resolving,  TCP  connect
18       etc.  The curl_off_t represents the time in microseconds.
19
20       See also the TIMES overview in the curl_easy_getinfo(3) man page.
21

PROTOCOLS

23       All
24

EXAMPLE

26       curl = curl_easy_init();
27       if(curl) {
28         curl_off_t total;
29         curl_easy_setopt(curl, CURLOPT_URL, url);
30         res = curl_easy_perform(curl);
31         if(CURLE_OK == res) {
32           res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total);
33           if(CURLE_OK == res) {
34             printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", total / 1000000,
35                    (long)(total % 1000000));
36           }
37         }
38         /* always cleanup */
39         curl_easy_cleanup(curl);
40       }
41

AVAILABILITY

43       Added in 7.61.0
44

RETURN VALUE

46       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
47       if not.
48

SEE ALSO

50       curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_TOTAL_TIME(3)
51
52
53
54libcurl 7.61.1                   May 17, 2018         CURLINFO_TOTAL_TIME_T(3)
Impressum