Ocular Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
Clock.hpp
1
17
#pragma once
18
#ifndef __H__OCULAR_TIME_CLOCK__H__
19
#define __H__OCULAR_TIME_CLOCK__H__
20
21
#include "Time\DateTime.hpp"
22
#include <chrono>
23
24
//------------------------------------------------------------------------------------------
25
30
namespace
Ocular
31
{
36
namespace
Core
37
{
41
class
Clock
42
{
43
public
:
44
45
Clock
();
46
~
Clock
();
47
52
void
tick
();
53
57
float
getDelta
();
58
62
uint64_t
getEpochMS
();
63
67
uint64_t
getEpochNS
();
68
72
uint64_t
getElapsedMS
();
73
77
uint64_t
getElapsedNS
();
78
82
DateTime
getDateTime
();
83
84
protected
:
85
86
private
:
87
88
std::chrono::milliseconds::rep m_CreationTimeMS;
89
std::chrono::nanoseconds::rep m_CreationTimeNS;
90
91
std::chrono::milliseconds::rep m_LastTick;
92
float
m_Delta;
93
};
94
}
98
}
103
//------------------------------------------------------------------------------------------
104
105
#endif
Ocular::Core::Clock::tick
void tick()
Definition:
Clock.cpp:52
Ocular::Core::Clock::getElapsedMS
uint64_t getElapsedMS()
Definition:
Clock.cpp:84
Ocular
Note: Once this library is made dynamic, this will no longer be needed.
Definition:
Common.hpp:70
Ocular::Core::Clock::getElapsedNS
uint64_t getElapsedNS()
Definition:
Clock.cpp:89
Ocular::Core::DateTime
Definition:
DateTime.hpp:40
Ocular::Core::Clock::getDelta
float getDelta()
Definition:
Clock.cpp:61
Ocular::Core::Clock::getEpochNS
uint64_t getEpochNS()
Definition:
Clock.cpp:75
Ocular::Core::Clock::getDateTime
DateTime getDateTime()
Definition:
Clock.cpp:94
Ocular::Core::Clock
Definition:
Clock.hpp:41
Ocular::Core::Clock::getEpochMS
uint64_t getEpochMS()
Definition:
Clock.cpp:66
OcularCore
include
Time
Clock.hpp
Generated on Tue Oct 18 2016 01:28:56 for Ocular Engine by
1.8.10