From: caro Date: Sun, 22 Feb 2009 19:21:36 +0000 (+0000) Subject: use evil_time_get() instead of gettimeofday() when using Evil. X-Git-Tag: 2.0_alpha~194^2~1633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=801eb87946778242b6f70fc5b56e0ec47a7f6aac;p=framework%2Fuifw%2Fecore.git use evil_time_get() instead of gettimeofday() when using Evil. 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 --- diff --git a/src/lib/ecore/ecore_time.c b/src/lib/ecore/ecore_time.c index f5163a5..fe4184f 100644 --- a/src/lib/ecore/ecore_time.c +++ b/src/lib/ecore/ecore_time.c @@ -13,7 +13,7 @@ #endif #ifdef HAVE_EVIL -# include /* for gettimeofday */ +# include #endif #include "Ecore.h" @@ -34,13 +34,17 @@ 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 }