SpiecsEngine
Loading...
Searching...
No Matches
ScopeTimer.cpp
Go to the documentation of this file.
1
/**
2
* @file ScopeTimer.cpp.
3
* @brief The ScopeTimer Class Implementation.
4
* @author Spices.
5
*/
6
7
#
include
"Pchheader.h"
8
#
include
"ScopeTimer.h"
9
10
namespace
Spices
{
11
12
Spices
::
ScopeTimer
::
ScopeTimer
(
const
std::string& log)
13
:
m_Log
(log)
14
{
15
/**
16
* @brief Init In Time.
17
*/
18
m_InTime = std::chrono::high_resolution_clock::now();
19
}
20
21
Spices
::
ScopeTimer
::~
ScopeTimer
()
22
{
23
/**
24
* @brief Init Leave Time.
25
*/
26
m_LeaveTime = std::chrono::high_resolution_clock::now();
27
28
std::stringstream ss;
29
ss <<
"ScopeTimer : "
<< std::chrono::duration<
float
, std::chrono::milliseconds::period>(m_LeaveTime - m_InTime).count() <<
" milliseconds "
<< m_Log;
30
31
SPICES_CORE_INFO(ss.str())
32
}
33
34
}
Spices::ScopeTimer::~ScopeTimer
virtual ~ScopeTimer()
Destructor Function.
Definition
ScopeTimer.cpp:21
Spices::ScopeTimer::ScopeTimer
ScopeTimer(const std::string &log)
Constructor Function.
Definition
ScopeTimer.cpp:12
Spices::ScopeTimer::m_Log
std::string m_Log
Logs.
Definition
ScopeTimer.h:46
Spices::ScopeTimer
This class helps recording scope time and output logs.
Definition
ScopeTimer.h:17
Spices
Definition
EntryPoint.cpp:4
SpicesEngine
src
Core
Timer
ScopeTimer.cpp
Generated on Sun Mar 8 2026 10:23:20 for SpiecsEngine by
1.10.0