From: yangxx Date: Mon, 27 Oct 2003 19:50:37 +0000 (+0000) Subject: git-svn-id: http://ltt.polymtl.ca/svn@323 04897980-b3bd-0310-b5e0-8ef037075253 X-Git-Tag: v0.12.20~3166 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e17c04d2b8c97c34969eb9a912a281ae7d5738db;p=lttv.git git-svn-id: ltt.polymtl.ca/svn@323 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/include/ltt/time.h b/ltt/branches/poly/include/ltt/time.h index dc0f8ecb..660e7e98 100644 --- a/ltt/branches/poly/include/ltt/time.h +++ b/ltt/branches/poly/include/ltt/time.h @@ -44,13 +44,14 @@ static inline LttTime ltt_time_add(LttTime t1, LttTime t2) static inline LttTime ltt_time_mul(LttTime t1, float f) { LttTime res; - float d = 1.0/f; + float d; double sec; if(f == 0.0){ res.tv_sec = 0; res.tv_nsec = 0; }else{ + d = 1.0/f; sec = t1.tv_sec / (double)d; res.tv_sec = sec; res.tv_nsec = t1.tv_nsec / (double)d + (sec - res.tv_sec) *