X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fcycle_timer.cc;h=4742d9617403c7095577a42641a23584943eb5f7;hb=dec10f2f3c6fffe27e72243d9bf36713d8f084f9;hp=02d1abb9307b0fde2c29db8b2c6b3aa8511454a6;hpb=b087721d8aaf9470833414d01a72d826162946ab;p=ardour.git diff --git a/libs/ardour/cycle_timer.cc b/libs/ardour/cycle_timer.cc index 02d1abb930..4742d96174 100644 --- a/libs/ardour/cycle_timer.cc +++ b/libs/ardour/cycle_timer.cc @@ -22,7 +22,9 @@ #include "pbd/error.h" #include "ardour/cycle_timer.h" -#include "i18n.h" +#include "ardour/libardour_visibility.h" + +#include "pbd/i18n.h" using namespace std; using namespace PBD; @@ -36,7 +38,7 @@ get_mhz() if ((f = fopen("/proc/cpuinfo", "r")) == 0) { fatal << _("CycleTimer::get_mhz(): can't open /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return 0.0f; } @@ -48,7 +50,7 @@ get_mhz() if (fgets (buf, sizeof(buf), f) == 0) { fatal << _("CycleTimer::get_mhz(): cannot locate cpu MHz in /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return 0.0f; } @@ -71,7 +73,7 @@ get_mhz() } fatal << _("cannot locate cpu MHz in /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return 0.0f; } @@ -83,8 +85,8 @@ StoringTimer::StoringTimer (int N) _max_points = N; _points = 0; } - +#ifndef NDEBUG void StoringTimer::dump (string const & file) { @@ -96,6 +98,7 @@ StoringTimer::dump (string const & file) f << _point[i] << " " << _ref[i] << " " << _value[i] << "\n"; } } +#endif void StoringTimer::ref () @@ -112,11 +115,11 @@ StoringTimer::check (int p) } else if (_points > _max_points) { return; } - + _point[_points] = p; _value[_points] = get_cycles (); _ref[_points] = _current_ref; - + ++_points; }