-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00e00e2
commit 63ce443
Showing
4 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include "TDebug.h" | ||
#include <windows.h> | ||
|
||
TOSHI_NAMESPACE_BEGIN | ||
|
||
class TOSHI_EXPORT TProfiler | ||
{ | ||
public: | ||
void Start(); | ||
void Stop(); | ||
|
||
static void __stdcall PrintSummary(); | ||
|
||
private: | ||
inline static TBOOL m_sProfilerStopped = TTRUE; | ||
|
||
LARGE_INTEGER m_iStartTime; | ||
}; | ||
|
||
TOSHI_NAMESPACE_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,38 @@ | ||
#pragma once | ||
|
||
#include "TObject.h" | ||
#include "TKernelInterface.h" | ||
#include "TNodeTree.h" | ||
#include "TTask.h" | ||
#include "TProfiler.h" | ||
|
||
TOSHI_NAMESPACE_BEGIN | ||
|
||
TBOOL Profiler_Control_ParentStart = TFALSE; | ||
TBOOL Profiler_Control_ParentStop = TFALSE; | ||
TProfiler Profiler_Program; | ||
|
||
class TOSHI_EXPORT TScheduler : public TObject | ||
{ | ||
DECLARE_DYNAMIC(TKernelInterface); | ||
public: | ||
|
||
TScheduler(); | ||
|
||
void Update(); | ||
void DestroyDyingTasks(TTask *a_pTask); | ||
private: | ||
void UpdateActiveTasks(TTask *a_pTask); | ||
void DeleteTask(TTask *a_pTask); | ||
void DeleteTaskRecurse(TTask *a_pTask); | ||
void DeleteTaskAtomic(TTask *a_pTask); | ||
private: | ||
TKernelInterface *m_pKernel; // 0x8 | ||
TNodeTree<TTask> m_oTaskTree; // 0xC | ||
TFLOAT m_fCurrentTimeDelta; // 0x24 | ||
TFLOAT m_fTotalTime; // 0x28 | ||
TFLOAT m_fDebugSlowTime; // 0x2C | ||
TFLOAT m_iFrameCount; // 0x30 | ||
}; | ||
|
||
TOSHI_NAMESPACE_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "TProfiler.h" | ||
|
||
TOSHI_NAMESPACE_USING | ||
|
||
void TProfiler::Start() | ||
{ | ||
m_sProfilerStopped = TFALSE; | ||
QueryPerformanceCounter(&m_iStartTime); | ||
} | ||
|
||
void TProfiler::Stop() | ||
{ | ||
m_sProfilerStopped = TTRUE; | ||
|
||
} | ||
|
||
void TProfiler::PrintSummary() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters