blob: 4e17952ff6182b484cbbe50bb3c6d6c3327a4d27 [file] [log] [blame]
#pragma once
#include "interfaces/clock.hpp"
#include "types/duration_types.hpp"
#include <chrono>
class Clock : public interfaces::Clock
{
public:
Milliseconds steadyTimestamp() const noexcept override
{
return std::chrono::time_point_cast<Milliseconds>(
std::chrono::steady_clock::now())
.time_since_epoch();
}
Milliseconds systemTimestamp() const noexcept override
{
return std::chrono::time_point_cast<Milliseconds>(
std::chrono::system_clock::now())
.time_since_epoch();
}
};