AuroraRuntime/Include/Aurora/Time/Timer.hpp

33 lines
493 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Timer.hpp
Date: 2021-6-10
Author: Reece
***/
#pragma once
namespace Aurora::Time
{
class Timer
{
public:
Timer()
{
Start();
}
void Start()
{
start_ = CurrentClockMS();
}
AuUInt64 End()
{
return CurrentClockMS() - start_;
}
private:
AuUInt64 start_;
};
}