#include <THPTimer_Win.h>
Definition at line 5 of file THPTimer_Win.h.
◆ THPTimer()
◆ ~THPTimer()
◆ GetCurrentSeconds()
TFLOAT THPTimer::GetCurrentSeconds |
( |
| ) |
const |
|
inline |
◆ GetDelta()
TFLOAT THPTimer::GetDelta |
( |
| ) |
const |
|
inline |
◆ GetRaw32()
Definition at line 25 of file THPTimer_Win.cpp.
26{
27 LARGE_INTEGER raw32;
28 QueryPerformanceCounter( &raw32 );
29 return static_cast<TUINT32>( raw32.QuadPart );
30}
◆ GetRaw64()
int64_t THPTimer::GetRaw64 |
( |
| ) |
|
Definition at line 32 of file THPTimer_Win.cpp.
33{
34 LARGE_INTEGER raw64;
35 QueryPerformanceCounter( &raw64 );
36 return raw64.QuadPart;
37}
◆ Reset()
Definition at line 40 of file THPTimer_Win.cpp.
41{
42 QueryPerformanceCounter( (LARGE_INTEGER*)&m_iCurrentTime );
43 QueryPerformanceFrequency( (LARGE_INTEGER*)&m_iFrequency );
44 m_iOldTime = m_iCurrentTime;
45 m_fDelta = 0;
46}
◆ Update()
void THPTimer::Update |
( |
| ) |
|
Definition at line 49 of file THPTimer_Win.cpp.
50{
51 m_iOldTime = m_iCurrentTime;
52 QueryPerformanceCounter( (LARGE_INTEGER*)&m_iCurrentTime );
53
54 double ratio = 1.0 / m_iFrequency;
55 m_fDelta =
TFLOAT( ( m_iCurrentTime - m_iOldTime ) * ratio );
56 m_fCurrentSeconds =
TFLOAT( m_iCurrentTime * ratio );
57}
The documentation for this class was generated from the following files: