git-svn-id: http://ltt.polymtl.ca/svn@323 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 27 Oct 2003 19:50:37 +0000 (19:50 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 27 Oct 2003 19:50:37 +0000 (19:50 +0000)
ltt/branches/poly/include/ltt/time.h

index dc0f8ecb67186a0af560c5c2e8a5ae4b4839536f..660e7e984a7da4a00d30d2f1dfe2f6935c31ea35 100644 (file)
@@ -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) *
This page took 0.02627 seconds and 4 git commands to generate.