From dc9285cbcb9d2ba5f661d6881b97bc416a44a829 Mon Sep 17 00:00:00 2001 From: TekotovaVA Date: Wed, 31 May 2023 22:14:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BD=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cs-lab34.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cs-lab34.cpp b/cs-lab34.cpp index 38131c4..5b94103 100644 --- a/cs-lab34.cpp +++ b/cs-lab34.cpp @@ -56,7 +56,11 @@ download(const string& address) { cout << curl_easy_strerror(res); exit(1); } - + curl_off_t speed; + res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed); + if (!res) { + fprintf(stderr, "Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n", speed); + } curl_easy_cleanup(curl); }