Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332680 - [LTTng] Round-off error in LTTng timestamps
Summary: [LTTng] Round-off error in LTTng timestamps
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Francois Chouinard CLA
QA Contact: Francois Chouinard CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 15:10 EST by Francois Chouinard CLA
Modified: 2022-01-13 14:53 EST (History)
0 users

See Also:


Attachments
Proper formatting of the LTTng timestamp (9.33 KB, patch)
2010-12-15 15:17 EST, Francois Chouinard CLA
fchouinard: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Chouinard CLA 2010-12-15 15:10:03 EST
While debugging another issue, I noticed that the LTTng timestamp displayed in the Events view was sometimes off by one.

Looking at the toString() method, it turned out that the formatting was done using float arithmetic... maybe not the best idea.
Comment 1 Francois Chouinard CLA 2010-12-15 15:17:56 EST
Created attachment 185262 [details]
Proper formatting of the LTTng timestamp

Got rid of the float arithmetic (and the round-off error) and implemented a more straightforward solution that spares us from messing with numerical analysis for no good reason.
Comment 2 Francois Chouinard CLA 2010-12-15 15:19:37 EST
Patch committed.
Comment 3 Francois Chouinard CLA 2011-07-22 14:56:13 EDT
Delivered with 0.7