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