use evil_time_get() instead of gettimeofday() when using Evil.
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 22 Feb 2009 19:21:36 +0000 (19:21 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 22 Feb 2009 19:21:36 +0000 (19:21 +0000)
It's more precise and involves fewer computations

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@39149 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore/ecore_time.c

index f5163a5..fe4184f 100644 (file)
@@ -13,7 +13,7 @@
 #endif
 
 #ifdef HAVE_EVIL
-# include <Evil.h> /* for gettimeofday */
+# include <Evil.h>
 #endif
 
 #include "Ecore.h"
 EAPI double
 ecore_time_get(void)
 {
-#ifdef HAVE_GETTIMEOFDAY
+#ifdef HAVE_EVIL
+  return evil_time_get();
+#else
+# ifdef HAVE_GETTIMEOFDAY
    struct timeval      timev;
 
    gettimeofday(&timev, NULL);
    return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000);
-#else
-# error "Your platform isn't supported yet"
+# else
+#  error "Your platform isn't supported yet"
+# endif
 #endif
 }