- minor refactoring - renamed TimeHelper to chronox

This commit is contained in:
2023-06-09 16:47:06 +03:00
parent 9ef74113b3
commit 6ff23247ec
2 changed files with 34 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ public:
static uint64_t getCurrentId();
};
class TimeHelper
class chronox
{
public:
// Returns current timestamp in milliseconds
@@ -59,6 +59,12 @@ public:
// Handles cases when clock is wrapped.
static uint32_t getDelta(uint32_t later, uint32_t earlier);
// Converts number of milliseconds starting from Epoch begin to timespec.
static timespec toTimespec(uint64_t milliseconds);
// Returns difference between timestamps in milliseconds
static int64_t getDelta(const timespec& a, const timespec& b);
class ExecutionTime
{
public: