bugfixing in progress
[lttv.git] / ltt / branches / poly / ltt / time.h
index 483e2e58a5bf3a8d21fb8c9572506ad55173d36b..d826e4ac93d54b5cdb5d4d71e6101a6462b6174b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <glib.h>
 #include <ltt/compiler.h>
+#include <math.h>
 
 typedef struct _LttTime {
   unsigned long tv_sec;
@@ -212,7 +213,7 @@ static inline LttTime ltt_time_div(LttTime t1, double d)
 
 static inline guint64 ltt_time_to_uint64(LttTime t1)
 {
-  return (guint64)((t1.tv_sec*LTT_TIME_UINT_SHIFT_CONST) >> LTT_TIME_UINT_SHIFT)
+  return (((guint64)t1.tv_sec*LTT_TIME_UINT_SHIFT_CONST) << LTT_TIME_UINT_SHIFT)
                        + (guint64)t1.tv_nsec;
 }
 
This page took 0.023212 seconds and 4 git commands to generate.