From da1da53fae61bf916924233c5198ebf7b2533f73 Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Fri, 22 Dec 2017 18:08:30 +0000 Subject: Make sure we are using a steady clock --- xmrstak/misc/executor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xmrstak/misc/executor.cpp') 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(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(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; -- cgit v1.1