@@ -924,7 +924,8 @@ std::string Uplink(bool bPost, std::string sPayload, std::string sBaseURL, std::
924924
925925 // Variables used to read the response from the server
926926 int size;
927- clock_t begin = clock();
927+ double nClockStart = GetAdjustedTime();
928+
928929 char buf[16384];
929930 memset(buf, 0, sizeof(buf));
930931
@@ -948,7 +949,8 @@ std::string Uplink(bool bPost, std::string sPayload, std::string sBaseURL, std::
948949 LogPrintf("\r\n BioReadFinished maxsize %f datasize %f ", dMaxSize, iRead);
949950
950951 clock_t end = clock();
951- double elapsed_secs = double(end - begin) / (CLOCKS_PER_SEC + .01);
952+ double elapsed_secs = GetAdjustedTime() - nClockStart;
953+
952954 if (elapsed_secs > iTimeoutSecs) break;
953955 if (TermPeekFound(sData, iBOE)) break;
954956
@@ -997,7 +999,7 @@ std::string AtomicCommunication(std::string Action, std::map<std::string, std::s
997999{
9981000 std::string sBaseDomain = "https://api.biblepay.org";
9991001 std::string sPage = "api/AtomicTrading/" + Action;
1000- std::string sResponse = Uplink(true, "", sBaseDomain, sPage, SSL_PORT, 15 , 1, mapRequestHeaders);
1002+ std::string sResponse = Uplink(true, "", sBaseDomain, sPage, SSL_PORT, 10 , 1, mapRequestHeaders);
10011003 return sResponse;
10021004}
10031005
0 commit comments