X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fcycle_timer.cc;h=a86124c5555901b4f4e1f413222c6ff07dac4928;hb=873498e196c1671e505631a3e526058a4458b419;hp=bb4f3181e040feb25f0234549a52cb7d9695cf70;hpb=6acdfc69b785841ac10a324484ddd0208612a213;p=ardour.git diff --git a/libs/ardour/cycle_timer.cc b/libs/ardour/cycle_timer.cc index bb4f3181e0..a86124c555 100644 --- a/libs/ardour/cycle_timer.cc +++ b/libs/ardour/cycle_timer.cc @@ -38,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; } @@ -50,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; } @@ -73,7 +73,7 @@ get_mhz() } fatal << _("cannot locate cpu MHz in /proc/cpuinfo") << endmsg; - /*NOTREACHED*/ + abort(); /*NOTREACHED*/ return 0.0f; } @@ -85,8 +85,8 @@ StoringTimer::StoringTimer (int N) _max_points = N; _points = 0; } - +#ifndef NDEBUG void StoringTimer::dump (string const & file) { @@ -98,6 +98,7 @@ StoringTimer::dump (string const & file) f << _point[i] << " " << _ref[i] << " " << _value[i] << "\n"; } } +#endif void StoringTimer::ref () @@ -114,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; }