diff base/Profiler.cpp @ 26:090c22aa726a

* Add the Note layer for pianoroll-type display of note-type data * Complete the MIDI file importer (well, nearly -- it would be nice to be able to import the non-note data as other sorts of models, and that's not done yet). * Minor refactoring in RealTime etc
author Chris Cannam
date Fri, 10 Feb 2006 17:51:36 +0000
parents 2fb933f88604
children 39ae3dee27b9
line wrap: on
line diff
--- a/base/Profiler.cpp	Thu Feb 09 18:01:52 2006 +0000
+++ b/base/Profiler.cpp	Fri Feb 10 17:51:36 2006 +0000
@@ -112,7 +112,7 @@
 
     struct timeval tv;
     (void)gettimeofday(&tv, 0);
-    m_startTime = RealTime(tv.tv_sec, tv.tv_usec * 1000);
+    m_startTime = RealTime::fromTimeval(tv);
 #endif
 }
 
@@ -124,7 +124,7 @@
 
     struct timeval tv;
     (void)gettimeofday(&tv, 0);
-    RealTime elapsedTime = RealTime(tv.tv_sec, tv.tv_usec * 1000) - m_startTime;
+    RealTime elapsedTime = RealTime::fromTimeval(tv) - m_startTime;
 
     cerr << "Profiler : id = " << m_c
 	 << " - elapsed so far = " << ((elapsedCPU * 1000) / CLOCKS_PER_SEC)
@@ -139,7 +139,7 @@
 
     struct timeval tv;
     (void)gettimeofday(&tv, 0);
-    RealTime elapsedTime = RealTime(tv.tv_sec, tv.tv_usec * 1000) - m_startTime;
+    RealTime elapsedTime = RealTime::fromTimeval(tv) - m_startTime;
 
     Profiles::getInstance()->accumulate(m_c, elapsedCPU, elapsedTime);