diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-06-14 21:17:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-06-14 21:17:32 +0000 |
commit | b09ab546542040b1d468c9925c60bda2dfd80da8 (patch) | |
tree | a64fdab212cbcc61fe0e2cf9d20dbc363141cf2a /libs/ardour/ardour/cycle_timer.h | |
parent | 2387ef8bfb49e60b233244580fd132d25c6dc3e3 (diff) |
use libsndfile for all audio file i/o, and rename DiskStream AudioDiskStream
git-svn-id: svn://localhost/ardour2/trunk@589 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/cycle_timer.h')
-rw-r--r-- | libs/ardour/ardour/cycle_timer.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h index 1ec7c74903..b9cbbbf0a8 100644 --- a/libs/ardour/ardour/cycle_timer.h +++ b/libs/ardour/ardour/cycle_timer.h @@ -22,29 +22,27 @@ #define __ardour_cycle_timer_h__ #include <string> -#include <cstdio> +#include <iostream> #include <ardour/cycles.h> -using std::string; - class CycleTimer { private: static float cycles_per_usec; - uint32_t long entry; - uint32_t long exit; - string _name; + cycles_t _entry; + cycles_t _exit; + std::string _name; public: - CycleTimer(string name) : _name (name){ + CycleTimer(std::string name) : _name (name){ if (cycles_per_usec == 0) { cycles_per_usec = get_mhz (); } - entry = get_cycles(); + _entry = get_cycles(); } ~CycleTimer() { - exit = get_cycles(); - printf ("%s: %.9f usecs (%lu-%lu)\n", _name.c_str(), (float) (exit - entry) / cycles_per_usec, entry, exit); + _exit = get_cycles(); + std::cerr << _name << ": " << (float) (_exit - _entry) / cycles_per_usec << " (" << _entry << ", " << _exit << ')' << endl; } static float get_mhz (); |