File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 3737#include < stdexcept>
3838#include < string>
3939#include < array>
40+ #include < chrono>
4041
4142#include < functional>
4243#include < vector>
@@ -1085,6 +1086,7 @@ std::string get_str_between_two_str(const std::string& s,
10851086}
10861087
10871088std::string KeyAuth::api::req (std::string data, std::string url) {
1089+ auto timestart = std::chrono::high_resolution_clock::now ();
10881090 CURL* curl = curl_easy_init ();
10891091 if (!curl)
10901092 return XorStr (" null" );
@@ -1113,6 +1115,8 @@ std::string KeyAuth::api::req(std::string data, std::string url) {
11131115 if (code != CURLE_OK)
11141116 error (curl_easy_strerror (code));
11151117
1118+ auto timeend = std::chrono::high_resolution_clock::now ();
1119+ KeyAuth::api::data.responsetime = std::chrono::duration_cast<std::chrono::milliseconds>(timestart - timeend).count ();
11161120 return to_return;
11171121}
11181122void error (std::string message) {
You can’t perform that action at this time.
0 commit comments