diff options
author | Sadaf Ebrahimi <sadafebrahimi@google.com> | 2024-02-21 03:36:27 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-02-21 03:36:27 +0000 |
commit | 57b9b27177b8f31dbe44a66b62f92201296b5337 (patch) | |
tree | 1b01132e15db02538dcf10922559df5a286d1cd6 /docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md | |
parent | 674dacb61ed7ec74e882b6413316e027b279a2c7 (diff) | |
parent | 5a7a71055c2c5ea8e7342422964c47f1e2d03970 (diff) | |
download | curl-57b9b27177b8f31dbe44a66b62f92201296b5337.tar.gz |
Merge "Upgrade curl to curl-8_6_0" into main am: 5a7a71055c
Original change: https://android-review.googlesource.com/c/platform/external/curl/+/2970072
Change-Id: I156c2098c246d275dc0d2a91fbbfcfba6e293306
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md')
-rw-r--r-- | docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md b/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md new file mode 100644 index 000000000..00454e752 --- /dev/null +++ b/docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md @@ -0,0 +1,70 @@ +--- +c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. +SPDX-License-Identifier: curl +Title: CURLINFO_QUEUE_TIME_T +Section: 3 +Source: libcurl +See-also: + - CURLINFO_STARTTRANSFER_TIME_T (3) + - CURLOPT_TIMEOUT (3) + - curl_easy_getinfo (3) + - curl_easy_setopt (3) +--- + +# NAME + +CURLINFO_QUEUE_TIME_T - time this transfer was queued + +# SYNOPSIS + +~~~c +#include <curl/curl.h> + +CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_QUEUE_TIME_T, + curl_off_t *timep); +~~~ + +# DESCRIPTION + +Pass a pointer to a curl_off_t to receive the time, in microseconds, this +transfer was held in a waiting queue before it started "for real". A transfer +might be put in a queue if after getting started, it cannot create a new +connection etc due to set conditions and limits imposed by the application. + +See also the TIMES overview in the curl_easy_getinfo(3) man page. + +# PROTOCOLS + +All + +# EXAMPLE + +~~~c +int main(void) +{ + CURL *curl = curl_easy_init(); + if(curl) { + CURLcode res; + curl_off_t queue; + curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); + res = curl_easy_perform(curl); + if(CURLE_OK == res) { + res = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue); + if(CURLE_OK == res) { + printf("Queued: %" CURL_FORMAT_CURL_OFF_T ".%06ld us", queue / 1000000, + (long)(queue % 1000000)); + } + } + /* always cleanup */ + curl_easy_cleanup(curl); + } +} +~~~ + +# AVAILABILITY + +Added in 8.6.0 + +# RETURN VALUE + +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. |