Forráskód Böngészése

plattform fix for win32

unknown 12 éve
szülő
commit
c84cf28aaa
2 módosított fájl, 7 hozzáadás és 1 törlés
  1. 0 1
      baselib/ProgressBar.cpp
  2. 7 0
      baselib/ProgressBarQt.cpp

+ 0 - 1
baselib/ProgressBar.cpp

@@ -10,7 +10,6 @@
 #include <core/imagedisplay/ImageDisplay.h>
 
 #include <iostream>
-#include <sys/time.h>
 
 #include "vislearning/baselib/ProgressBar.h"
 

+ 7 - 0
baselib/ProgressBarQt.cpp

@@ -13,7 +13,9 @@
 
 
 #include <iostream>
+#ifndef WIN32
 #include <sys/time.h>
+#endif
 
 #include "vislearning/baselib/ProgressBarQt.h"
 
@@ -92,12 +94,17 @@ void ProgressBarQt::displayTimeStat(int posy, char *text, double time)
 
 double ProgressBarQt::getCurrentTime()
 {
+
+#ifdef WIN32
+	throw std::exception("function not yet ported, use boost::time_date here");
+#else
   struct timeval curtime;
 
   gettimeofday ( &curtime, NULL );
 
 	//return curtime.tv_sec * 100.0 + curtime.tv_usec / 10000.0;
 	return curtime.tv_sec + curtime.tv_usec * 1e-6;
+#endif
 }
 
 void ProgressBarQt::show()