X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Ftime.h;h=14c15d1d237c1d7d184033636750a510a63e8e16;hb=845a3be5d28365527f858fcdaba910aca0065284;hp=2aafdb23ef9d9999a0640c1b435bcef2d1fd25ef;hpb=21ff84a0d872ff069d4ec62d0a5bed21bcfeeac5;p=lttv.git diff --git a/ltt/branches/poly/ltt/time.h b/ltt/branches/poly/ltt/time.h index 2aafdb23..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 @@ -213,7 +214,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; }