diff --git a/lab3344.cbp b/lab3344.cbp
index f10a211..fb35692 100644
--- a/lab3344.cbp
+++ b/lab3344.cbp
@@ -11,9 +11,15 @@
+
+
+
+
+
+
@@ -31,8 +37,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main.cpp b/main.cpp
index 342def5..b8d53e5 100644
--- a/main.cpp
+++ b/main.cpp
@@ -60,16 +60,26 @@ download(const string& address)
if(curl)
{
CURLcode res;
+ double total;
curl_easy_setopt(curl, CURLOPT_URL, address.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
res = curl_easy_perform(curl);
- if (res != 0)
+ if (res != CURLE_OK)
{
cout << curl_easy_strerror(res);
exit(1);
}
+ if(CURLE_OK == res)
+ {
+
+ res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total);
+ if(CURLE_OK == res)
+ {
+ cerr<<"Time: "<< total;
+ }
+ }
curl_easy_cleanup(curl);
}
return input_data(buffer, false);