Skip to content

Nanosecond length is not constant #1

@roboticforest

Description

@roboticforest

The number of digits displayed when nanoseconds are printed is not padded with zeros and so is not constant. This is an issue because when sorting the lines of a log file a simple alphabetical sort may put lines in the wrong order.

Sample:

[PDT 2020-08-14 16:31:32:990454020] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 130 70
[PDT 2020-08-14 16:31:32:996075273] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 129 69
[PDT 2020-08-14 16:31:33:4195501] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 128 69
[PDT 2020-08-14 16:31:33:20207645] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 127 68
[PDT 2020-08-14 16:31:35:692520355] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 127 66
[PDT 2020-08-14 16:31:35:700800609] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 126 64
[PDT 2020-08-14 16:31:35:708538682] [DVGE:INFO]	LinuxWindow::handleEvent(): Mouse Move: 125 62

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions