Sfoglia il codice sorgente

Add non-unix timing

[SVN r12005]
Beman Dawes 24 anni fa
parent
commit
a9a4802c55
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      status/regression.cpp

+ 7 - 1
status/regression.cpp

@@ -33,6 +33,8 @@
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <sys/resource.h>
+#else
+#include <boost/progress.hpp>
 #endif
 
 // It is OK to use boost headers which contain entirely inline code.
@@ -329,7 +331,11 @@ bool execute(const std::string & command)
               << std::endl;
   }
 #else
-  int ret = std::system(command.c_str());
+  int ret;
+  {
+    boost::progress_timer pt;
+    ret = std::system(command.c_str());
+  }
 #endif
   if(ret != 0)
     std::cout << "Return code: " << ret << std::endl;

粤ICP备19079148号