summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc/executor.cpp
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2017-12-22 20:57:29 +0100
committerGitHub <noreply@github.com>2017-12-22 20:57:29 +0100
commit3f8b269b72c75a2cd42d6b99d5622328ac76e3e2 (patch)
treedd80e15e9d6559967335d42ad07ba64a6e4d35da /xmrstak/misc/executor.cpp
parent8f8907254707c6d8bfcb970c130b9be302e27d2d (diff)
parentda1da53fae61bf916924233c5198ebf7b2533f73 (diff)
downloadxmr-stak-3f8b269b72c75a2cd42d6b99d5622328ac76e3e2.zip
xmr-stak-3f8b269b72c75a2cd42d6b99d5622328ac76e3e2.tar.gz
Merge pull request #664 from fireice-uk/topic-fix-clock
Make sure we are using a steady clock
Diffstat (limited to 'xmrstak/misc/executor.cpp')
-rw-r--r--xmrstak/misc/executor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp
index 3aeb408..a3088a5 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -423,10 +423,9 @@ void executor::on_miner_result(size_t pool_id, job_result& oResult)
return;
}
- using namespace std::chrono;
- size_t t_start = time_point_cast<milliseconds>(high_resolution_clock::now()).time_since_epoch().count();
+ size_t t_start = get_timestamp_ms();
bool bResult = pool->cmd_submit(oResult.sJobID, oResult.iNonce, oResult.bResult, pvThreads->at(oResult.iThreadId), is_monero);
- size_t t_len = time_point_cast<milliseconds>(high_resolution_clock::now()).time_since_epoch().count() - t_start;
+ size_t t_len = get_timestamp_ms() - t_start;
if(t_len > 0xFFFF)
t_len = 0xFFFF;
OpenPOWER on IntegriCloud