#include <TSystem.h>
Definition at line 48 of file TSystem.h.
◆ QuitCallback
◆ TSystemTimer()
TSystemTimer::TSystemTimer |
( |
| ) |
|
Definition at line 17 of file TSystem.cpp.
18{
21 m_fAverageFps = 0.0f;
22 m_uiNumFrames = 0;
24 m_fnQuitCallback =
TNULL;
25}
◆ ~TSystemTimer()
TSystemTimer::~TSystemTimer |
( |
| ) |
|
◆ GetFPS()
TFLOAT TSystemTimer::GetFPS |
( |
| ) |
const |
|
inline |
Definition at line 91 of file TSystem.h.
92 {
93 return 1.0f / m_Timer.GetDelta();
94 }
◆ GetNumFrames()
TUINT TSystemTimer::GetNumFrames |
( |
| ) |
const |
|
inline |
Definition at line 64 of file TSystem.h.
65 {
66 return m_uiNumFrames;
67 }
◆ GetScheduler()
Definition at line 69 of file TSystem.h.
70 {
71 return m_Scheduler;
72 }
◆ GetTimer()
Definition at line 59 of file TSystem.h.
60 {
61 return m_Timer;
62 }
◆ IsPaused()
TBOOL TSystemTimer::IsPaused |
( |
| ) |
const |
|
inline |
Definition at line 79 of file TSystem.h.
80 {
81 return m_bIsPaused;
82 }
◆ SetPaused()
Definition at line 84 of file TSystem.h.
85 {
86 TBOOL bOldState = m_bIsPaused;
87 m_bIsPaused = a_bPaused;
88 return bOldState;
89 }
◆ SetQuitCallback()
void TSystemTimer::SetQuitCallback |
( |
QuitCallback | a_fnQuitCallback | ) |
|
|
inline |
Definition at line 96 of file TSystem.h.
97 {
98 m_fnQuitCallback = a_fnQuitCallback;
99 }
◆ SetScheduler()
void TSystemTimer::SetScheduler |
( |
TScheduler * | a_pScheduler | ) |
|
|
inline |
Definition at line 74 of file TSystem.h.
75 {
76 m_Scheduler = a_pScheduler;
77 }
◆ Update()
void TSystemTimer::Update |
( |
| ) |
|
Definition at line 27 of file TSystem.cpp.
28{
29 m_Timer.Update();
30
31 TFLOAT fDeltaTime = m_Timer.GetDelta();
32 m_fSecond += fDeltaTime;
33
34 if ( m_fSecond > 1.0f )
35 {
36 m_fAverageFps += 1.0f / fDeltaTime;
37 m_fAverageFps *= 0.5f;
38 m_fSecond = 0.0;
39 }
40
41 m_uiNumFrames += 1;
42 m_Scheduler->Update();
43}
The documentation for this class was generated from the following files:
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Toshi/TSystem.h
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Toshi/TSystem.cpp