1CURLINFO_STARTTRANSFER_TIME(c3u)rl_easy_getinfo optiCoUnRsLINFO_STARTTRANSFER_TIME(3)
2
3
4

NAME

6       CURLINFO_STARTTRANSFER_TIME  -  get  the  time  until the first byte is
7       received
8

SYNOPSIS

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

DESCRIPTION

16       Pass  a  pointer  to  a double to receive the time, in seconds, it took
17       from the start until the  first  byte  is  received  by  libcurl.  This
18       includes  CURLINFO_PRETRANSFER_TIME(3)  and  also  the  time the server
19       needs to calculate the result.
20
21       See also the TIMES overview in the curl_easy_getinfo(3) man page.
22

PROTOCOLS

24       All
25

EXAMPLE

27       curl = curl_easy_init();
28       if(curl) {
29         double start;
30         curl_easy_setopt(curl, CURLOPT_URL, url);
31         res = curl_easy_perform(curl);
32         if(CURLE_OK == res) {
33           res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start);
34           if(CURLE_OK == res) {
35             printf("Time: %.1f", start);
36           }
37         }
38         /* always cleanup */
39         curl_easy_cleanup(curl);
40       }
41

AVAILABILITY

43       Added in 7.9.2
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_STARTTRANSā€
51       FER_TIME_T(3)
52
53
54
55libcurl 7.61.1                   May 17, 2018   CURLINFO_STARTTRANSFER_TIME(3)
Impressum