CURLINFO_QUEUE_TIME_T.3 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .\" generated by cd2nroff 0.1 from CURLINFO_QUEUE_TIME_T.md
  2. .TH CURLINFO_QUEUE_TIME_T 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLINFO_QUEUE_TIME_T \- time this transfer was queued
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_QUEUE_TIME_T,
  9. curl_off_t *timep);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a pointer to a curl_off_t to receive the time, in microseconds, this
  13. transfer was held in a waiting queue before it started "for real". A transfer
  14. might be put in a queue if after getting started, it cannot create a new
  15. connection etc due to set conditions and limits imposed by the application.
  16. See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
  17. .SH PROTOCOLS
  18. This functionality affects all supported protocols
  19. .SH EXAMPLE
  20. .nf
  21. int main(void)
  22. {
  23. CURL *curl = curl_easy_init();
  24. if(curl) {
  25. CURLcode res;
  26. curl_off_t queue;
  27. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  28. res = curl_easy_perform(curl);
  29. if(CURLE_OK == res) {
  30. res = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue);
  31. if(CURLE_OK == res) {
  32. printf("Queued: %" CURL_FORMAT_CURL_OFF_T ".%06ld us", queue / 1000000,
  33. (long)(queue % 1000000));
  34. }
  35. }
  36. /* always cleanup */
  37. curl_easy_cleanup(curl);
  38. }
  39. }
  40. .fi
  41. .SH AVAILABILITY
  42. Added in curl 8.6.0
  43. .SH RETURN VALUE
  44. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  45. .SH SEE ALSO
  46. .BR CURLINFO_STARTTRANSFER_TIME_T (3),
  47. .BR CURLOPT_TIMEOUT (3),
  48. .BR curl_easy_getinfo (3),
  49. .BR curl_easy_setopt (3)