1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-07 16:05:05 -05:00

Refactored Chrono::highResolutionMSecs()

Improved precision
This commit is contained in:
SChernykh
2021-11-30 08:11:09 +01:00
parent e673d541c1
commit efb322df66
5 changed files with 59 additions and 34 deletions

View File

@@ -29,12 +29,7 @@ namespace xmrig {
class Chrono
{
public:
static inline uint64_t highResolutionMSecs()
{
using namespace std::chrono;
return static_cast<uint64_t>(time_point_cast<milliseconds>(high_resolution_clock::now()).time_since_epoch().count());
}
static double highResolutionMSecs();
static inline uint64_t steadyMSecs()