[lttng-dev] [EXTERNAL] Re: difference of timestamp between babeltrace and python binding

Kim, Seongab Seongab.Kim at harman.com
Thu Jul 23 01:43:27 EDT 2020


> -----Original Message-----
> From: Philippe Proulx <eeppeliteloop at gmail.com>
> Sent: Wednesday, July 22, 2020 4:57 PM
> To: Kim, Seongab <Seongab.Kim at harman.com>
> Cc: lttng-dev at lists.lttng.org
> Subject: [EXTERNAL] Re: [lttng-dev] difference of timestamp between
> babeltrace and python binding
> 
> `type(1e3)` is `float`.
> 
> You get an inaccurate floating point division operation here instead of an
> integral one.
> 
> Do:
> 
>     ns_from_origin % 1000
> 
> or
> 
>     ns_from_origin % int(1e3)
> 
> instead.
> 
> Hope this helps,
> 
> Phil
> 

Hi Phil,

Thanks. With the change, it works as expected.

Best regards,
Seongab


More information about the lttng-dev mailing list