From: "Kim, Seongab via lttng-dev" Subject: Re: [EXTERNAL] Re: difference of timestamp between babeltrace and python binding Date: Thu, 23 Jul 2020 05:43:27 +0000 Message-ID: References: <15ed8d31ec16483db50928860aa4a4e5@HIMDWSMB06.ad.harman.com> Reply-To: "Kim, Seongab" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail1.bemta24.messagelabs.com (mail1.bemta24.messagelabs.com [67.219.250.5]) by lists.lttng.org (Postfix) with ESMTPS id 4BC1Tg0Wf6z1fS2 for ; Thu, 23 Jul 2020 01:43:34 -0400 (EDT) In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Philippe Proulx Cc: "lttng-dev@lists.lttng.org" List-Id: lttng-dev@lists.lttng.org > -----Original Message----- > From: Philippe Proulx > Sent: Wednesday, July 22, 2020 4:57 PM > To: Kim, Seongab > Cc: lttng-dev@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