Initial commit

This commit is contained in:
Alexander Kobjolke 2025-03-13 22:36:51 +01:00
commit 4f4397b3e1
48 changed files with 2002 additions and 0 deletions

View file

@ -0,0 +1,26 @@
// -*- mode: c++ -*-
#pragma once
#include "../time.h"
#include <chrono>
namespace atlas::time {
class HighResolutionTimer : public Timer<std::chrono::milliseconds> {
public:
void start() override
{
m_start = std::chrono::high_resolution_clock::now();
}
auto elapsed() const -> duration_type override
{
return std::chrono::duration_cast<duration_type>(std::chrono::high_resolution_clock::now() - m_start);
}
private:
std::chrono::high_resolution_clock::time_point m_start;
};
}