From: pini Date: Tue, 6 Apr 2010 08:39:02 +0000 (+0000) Subject: We want time in seconds. X-Git-Tag: SVN~304 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dc60bc9feb80ec512f3d5dce27bb2a7560ac529e We want time in seconds. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7436 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/xbt_os_time.c b/src/xbt/xbt_os_time.c index 3b0a26b2b7..a7f17f5b2e 100644 --- a/src/xbt/xbt_os_time.c +++ b/src/xbt/xbt_os_time.c @@ -127,7 +127,7 @@ double xbt_os_timer_elapsed(xbt_os_timer_t timer) #ifdef HAVE_POSIX_GETTIME return ((double) timer->stop.tv_sec) - ((double) timer->start.tv_sec) + ((((double) timer->stop.tv_nsec) - - ((double) timer->start.tv_nsec)) / 1e-9); + ((double) timer->start.tv_nsec)) / 1e9); #elif defined(HAVE_GETTIMEOFDAY) return ((double) timer->stop.tv_sec) - ((double) timer->start.tv_sec) + ((((double) timer->stop.tv_usec) -