Skip to content

Commit

Permalink
Make the dates into a proper UNIX timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
fireice-uk committed Jul 18, 2017
1 parent 7a6842d commit 7b05d55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,10 +898,12 @@ void executor::http_json_report(std::string& out)
char buffer[256];
for(size_t i=1; i < vMineResults.size(); i++)
{
using namespace std::chrono;
if(i != 0) res_error.append(1, ',');

snprintf(buffer, sizeof(buffer), sJsonApiResultError, int_port(vMineResults[i].count),
int_port(vMineResults[i].time.time_since_epoch().count()), vMineResults[i].msg.c_str());
int_port(duration_cast<seconds>(vMineResults[i].time.time_since_epoch()).count()),
vMineResults[i].msg.c_str());
res_error.append(buffer);
}

Expand All @@ -917,10 +919,12 @@ void executor::http_json_report(std::string& out)
cn_error.reserve(vSocketLog.size() * 128);
for(size_t i=0; i < vSocketLog.size(); i++)
{
using namespace std::chrono;
if(i != 0) cn_error.append(1, ',');

snprintf(buffer, sizeof(buffer), sJsonApiConnectionError,
int_port(vSocketLog[i].time.time_since_epoch().count()), vSocketLog[i].msg.c_str());
int_port(duration_cast<seconds>(vMineResults[i].time.time_since_epoch()).count()),
vSocketLog[i].msg.c_str());
cn_error.append(buffer);
}

Expand Down

0 comments on commit 7b05d55

Please sign in to comment.