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