[cig-commits] r11524 - cs/benchmark/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Mon Mar 24 09:27:15 PDT 2008


Author: luis
Date: 2008-03-24 09:27:15 -0700 (Mon, 24 Mar 2008)
New Revision: 11524

Added:
   cs/benchmark/cigma/trunk/src/Timer.cpp
Modified:
   cs/benchmark/cigma/trunk/src/Timer.h
Log:
Moved output routine to Timer.cpp


Added: cs/benchmark/cigma/trunk/src/Timer.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/Timer.cpp	                        (rev 0)
+++ cs/benchmark/cigma/trunk/src/Timer.cpp	2008-03-24 16:27:15 UTC (rev 11524)
@@ -0,0 +1,15 @@
+#include "Timer.h"
+
+std::ostream &operator<<(std::ostream &os, const Timer &T)
+{
+    os << T.current << " "
+       << T.num_per_sec << " "
+       << T.elapsed_mins << " "
+       << T.remaining_mins << " "
+       << T.total_mins << " "
+       << T.progress << "%"
+       << "          "
+          "          "
+          "\r"
+       << std::flush;
+}

Modified: cs/benchmark/cigma/trunk/src/Timer.h
===================================================================
--- cs/benchmark/cigma/trunk/src/Timer.h	2008-03-24 16:27:13 UTC (rev 11523)
+++ cs/benchmark/cigma/trunk/src/Timer.h	2008-03-24 16:27:15 UTC (rev 11524)
@@ -2,6 +2,7 @@
 #define __TIMER_H__
 
 #include <iostream>
+#include <cassert>
 #include <ctime>
 
 class Timer
@@ -60,19 +61,7 @@
 };
 
 
-std::ostream &operator<<(std::ostream &os, const Timer &T)
-{
-    os << T.current << " "
-       << T.num_per_sec << " "
-       << T.elapsed_mins << " "
-       << T.remaining_mins << " "
-       << T.total_mins << " "
-       << T.progress << "%"
-       << "          "
-          "          "
-          "\r"
-       << std::flush;
-}
+std::ostream &operator<<(std::ostream &os, const Timer &T);
 
 
 #endif



More information about the cig-commits mailing list