diff --git a/main.cpp b/main.cpp index caf6efe..e8bfde7 100644 --- a/main.cpp +++ b/main.cpp @@ -36,8 +36,8 @@ input_data(istream& in_stream,bool prompt) { in.colors.resize(in.bin_count); for (size_t i = 0; i < in.bin_count; i++) { - in_stream >> in.colors[i]; - //in.colors[i]="red"; + //in_stream >> in.colors[i]; + in.colors[i]="red"; bool check = check_color(in.colors[i]); while (!check) { if (prompt) cerr << "Incorrect input. Color doesn't contain # or has spaces." << endl; @@ -75,10 +75,18 @@ Input download(const string& address) { curl_easy_setopt(curl, CURLOPT_HEADERDATA, NULL); res = curl_easy_perform(curl); curl_easy_cleanup(curl); + if (res != CURLE_OK) { cout << curl_easy_strerror(res); exit(1); } + else + { + double *ct; + res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &ct); + if((CURLE_OK == res) && ct) + printf("Time: %f\n",ct); + } } return input_data(buffer, false);