4#include "MRPch/MRBindingMacros.h"
19 Timer( std::string name ) { start( std::move( name ) ); }
31 std::chrono::duration<double>
secondsPassed()
const {
return std::chrono::high_resolution_clock::now() - start_; }
34 std::chrono::time_point<std::chrono::high_resolution_clock> start_;
35 bool started_{
false };
53#define MR_TIMER MR::Timer _timer( __FUNCTION__ );
54#define MR_NAMED_TIMER(name) MR::Timer _named_timer( name );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
MRMESH_API void restart(std::string name)
Timer(const Timer &)=delete
~Timer()
Definition MRTimer.h:20
std::chrono::duration< double > secondsPassed() const
Definition MRTimer.h:31
MRMESH_API void start(std::string name)
Timer(std::string name)
Definition MRTimer.h:19
MRMESH_API void printTimingTreeAtEnd(bool on, double minTimeSec=0.1)
MRMESH_API void printCurrentTimerBranch()
prints current timer branch
MRMESH_API void printTimingTreeAndStop(double minTimeSec=0.1)
Definition MRCameraOrientationPlugin.h:8