X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fcycle_timer.h;h=54a2d1d8f2d27f47df119a55902e42828f721312;hb=a3856d44b2add305a8a7296c54818fedd1dffc8c;hp=0335375c8aeed7ff878c2e477aca56c6df217913;hpb=5792674ca4d02e093b4318d31a117a47ae72ecdf;p=ardour.git diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h index 0335375c8a..54a2d1d8f2 100644 --- a/libs/ardour/ardour/cycle_timer.h +++ b/libs/ardour/ardour/cycle_timer.h @@ -42,19 +42,21 @@ class LIBARDOUR_API CycleTimer { public: CycleTimer(const std::string& name) { #ifndef NDEBUG - if (PBD::debug_bits & PBD::DEBUG::CycleTimers) { + if (DEBUG_ENABLED (PBD::DEBUG::CycleTimers)) { _name = name; if (cycles_per_usec == 0) { cycles_per_usec = get_mhz (); } _entry = get_cycles(); } +#else + (void) name; #endif } ~CycleTimer() { #ifndef NDEBUG - if (PBD::debug_bits & PBD::DEBUG::CycleTimers) { + if (DEBUG_ENABLED (PBD::DEBUG::CycleTimers)) { _exit = get_cycles(); std::cerr << _name << ": " << (float) (_exit - _entry) / cycles_per_usec << " (" << _entry << ", " << _exit << ')' << std::endl; } @@ -68,7 +70,9 @@ public: StoringTimer (int); void ref (); void check (int); +#ifndef NDEBUG void dump (std::string const &); +#endif private: cycles_t _current_ref;