diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-07-18 21:49:50 +0100 |
---|---|---|
committer | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-07-18 21:49:50 +0100 |
commit | 7b05d559260e9a1ae2f655b89a953457a34ed473 (patch) | |
tree | 987a7d422d821dac98dc44751041313d05fcb74e /executor.cpp | |
parent | 7a6842dbd9351f4b00f0afd6cf4033036f130249 (diff) | |
download | xmr-stak-7b05d559260e9a1ae2f655b89a953457a34ed473.zip xmr-stak-7b05d559260e9a1ae2f655b89a953457a34ed473.tar.gz |
Make the dates into a proper UNIX timestamp
Diffstat (limited to 'executor.cpp')
-rw-r--r-- | executor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/executor.cpp b/executor.cpp index 6388c4b..4e5917d 100644 --- a/executor.cpp +++ b/executor.cpp @@ -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); } @@ -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); } |