remove lib math because of bad interaction with gtk
[lttv.git] / ltt / branches / poly / ltt / time.h
index 6622decea9f9f9a7c4dd70689cb7b3f414321787..2aafdb23ef9d9999a0640c1b435bcef2d1fd25ef 100644 (file)
@@ -116,9 +116,9 @@ static inline double ltt_time_to_double(LttTime t1)
   if(t1.tv_sec > MAX_TV_SEC_TO_DOUBLE)
     g_warning("Precision loss in conversion LttTime to double");
 #endif //EXTRA_CHECK
-  return round(((double)((guint64)t1.tv_sec<<DOUBLE_SHIFT)
+  return ((double)((guint64)t1.tv_sec<<DOUBLE_SHIFT)
                   * (double)DOUBLE_SHIFT_CONST_MUL)
-                  + (double)t1.tv_nsec);
+                  + (double)t1.tv_nsec;
 }
 
 
@@ -140,7 +140,7 @@ static inline LttTime ltt_time_from_double(double t1)
   LttTime res;
   //res.tv_sec = t1/(double)NANOSECONDS_PER_SECOND;
   res.tv_sec = (guint64)(t1 * DOUBLE_SHIFT_CONST_DIV) >> DOUBLE_SHIFT;
-  res.tv_nsec = (round(t1) - (((guint64)res.tv_sec<<LTT_TIME_UINT_SHIFT))
+  res.tv_nsec = (t1 - (((guint64)res.tv_sec<<LTT_TIME_UINT_SHIFT))
                                * LTT_TIME_UINT_SHIFT_CONST);
   return res;
 }
This page took 0.02341 seconds and 4 git commands to generate.