33 lines
493 B
C++
33 lines
493 B
C++
|
/***
|
||
|
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_;
|
||
|
};
|
||
|
}
|