X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftime.h;h=14c15d1d237c1d7d184033636750a510a63e8e16;hb=0dee0e75e8a541ad435e9af431c426c53f155d71;hp=6622decea9f9f9a7c4dd70689cb7b3f414321787;hpb=0a2cbfbed386cdcc594561824a2e3d0596ade446;p=lttv.git diff --git a/ltt/branches/poly/ltt/time.h b/ltt/branches/poly/ltt/time.h index 6622dece..14c15d1d 100644 --- a/ltt/branches/poly/ltt/time.h +++ b/ltt/branches/poly/ltt/time.h @@ -1,5 +1,6 @@ /* This file is part of the Linux Trace Toolkit trace reading library * Copyright (C) 2003-2004 Michel Dagenais + * 2005 Mathieu Desnoyers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -116,9 +117,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; - res.tv_nsec = (round(t1) - (((guint64)res.tv_sec<> LTT_TIME_UINT_SHIFT) + return (((guint64)t1.tv_sec*LTT_TIME_UINT_SHIFT_CONST) << LTT_TIME_UINT_SHIFT) + (guint64)t1.tv_nsec; }