CURLINFO_QUEUE_TIME_T(3)
β¨ CURLINFO_QUEUE_TIME_T β¨ (3)
okay so real quick β this is a page from the Library Functions Manual, and the star of the show is CURLINFO_QUEUE_TIME_T, bestie π
πΈ NAME πΈ
CURLINFO_QUEUE_TIME_T β literally the time this transfer was queued π°οΈ
π SYNOPSIS π
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_QUEUE_TIME_T,
curl_off_t *timep);
π¦ DESCRIPTION π¦
so you pass a pointer to a curl_off_t, right? and that gets filled in with the time β in microseconds β that this transfer was just vibing in a waiting queue before it started "for real" β¨
like, a transfer might get put in a queue if, after it got started, it can't create a new connection etc. because of conditions and limits the application set up. so it's just sitting there, in its little waiting room, waiting for its main character moment ππ
also pls go peek at the TIMES overview in the curl_easy_getinfo(3) man page, it's a whole thing π
π PROTOCOLS π
this functionality affects all supported protocols π«Ά
π§ EXAMPLE π§
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_off_t queue;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
result = curl_easy_perform(curl);
if(CURLE_OK == result) {
result = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue);
if(CURLE_OK == result) {
printf("Queued: %" CURL_FORMAT_CURL_OFF_T ".%06ld us", queue / 1000000,
(long)(queue % 1000000));
}
}
/* always cleanup */
curl_easy_cleanup(curl);
}
}
β AVAILABILITY β
added in curl 8.6.0 β so if you're on anything older it's giving "not invited to the party" π
π RETURN VALUE π
curl_easy_getinfo(3) returns a CURLcode indicating success or error.
CURLE_OK (that's 0) means everything was OK π β non-zero means an error occurred, so go check libcurl-errors(3) for the tea π₯
π SEE ALSO π
k bye bestie, this page is from libcurl, dated 2026-10-12 β go forth and time your queues π β¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms