[Kst] branches/work/kst/portto4/kst/src/libkst

Peter Kümmel syntheticpp at yahoo.com
Sun Nov 29 23:25:57 CET 2009


SVN commit 1056355 by kuemmel:

measure time before printing interval

 M  +7 -5      measuretime.cpp  


--- branches/work/kst/portto4/kst/src/libkst/measuretime.cpp #1056354:1056355
@@ -50,11 +50,12 @@
 
 MeasureTime::~MeasureTime()
 {
-  measure();
-  if (other_interval)
-      *other_interval += interval;
-  else
-     print();
+  if (other_interval) {
+    measure();
+    *other_interval += interval;
+  } else {
+    print();
+  }
 }
 
 
@@ -91,6 +92,7 @@
 
 void MeasureTime::print()
 {
+  measure();
   printf("%s: %f sec \n", qPrintable(name), interval);
 }
 


More information about the Kst mailing list