r197: *** empty log message ***
[ctsim.git] / include / timer.h
index 705627f703dd561a8b63555343843a686ddf3526..78b19e907358e73b768aebb05093ac4ac0b504fe 100644 (file)
@@ -2,7 +2,9 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 
 class Timer
 {
@@ -43,11 +45,15 @@ class Timer
 
     double ttime(void) const
        {
+#ifdef HAVE_GETTIMEOFDAY
            struct timeval now;
            if (gettimeofday (&now, NULL))
                return 0;
            
            return (now.tv_sec + static_cast<double>(now.tv_usec) / 1000000.);
+#else
+           return 0;
+#endif
        }
 };