51 template<
typename... ArgsT>
57 std::cout <<
"{Timer Block}: " << printout << std::endl;
69 : m_onDeleteCallback( onDeleteCallback ),
70 m_start(
agx::Timer::getCurrentTick() ),
71 m_stop(
agx::InvalidIndex )
83 if ( m_onDeleteCallback )
84 m_onDeleteCallback( m_start, m_stop );
Utility class to time a scope.
static TimerBlock create(const agx::String &format, ArgsT &&... args)
Create timer block given format string.
TimerBlock(OnDeleteCallback onDeleteCallback)
Construct given title.
~TimerBlock()
Print during destruction.
std::function< void(agx::UInt64, agx::UInt64)> OnDeleteCallback
void stop()
Stop the timer before we leave the scope.
static AgXString format(const char *format,...)
C printf formatting of a string.
static UInt64 getCurrentTick()
static Real64 convertToMs(UInt64 ticks)
The agxUtil namespace contain classes and methods for utility functionality.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT const InvalidIndexStruct InvalidIndex