Skip to content

2.2.6.3 OSI trace file example: Bug in script #856

Open
@localhorst87

Description

@localhorst87

Just a minor thing: In the example how to generate a trace file from scratch, using python in 2.2.6.3 of the documentation, the following section is creating timestamps that violate the given rules:

# Increment the time
if sv_ground_truth.timestamp.nanos > 1000000000:
   sv_ground_truth.timestamp.seconds += 1
   sv_ground_truth.timestamp.nanos = 0
sv_ground_truth.timestamp.nanos += NANO_INCREMENT

It generates two timestamps each second where the nanos are equal or higher than 1e9.

The section can be rewritten to

# Increment the time
sv_ground_truth.timestamp.nanos += NANO_INCREMENT
if sv_ground_truth.timestamp.nanos > 999999999:
   sv_ground_truth.timestamp.seconds += 1
   sv_ground_truth.timestamp.nanos = 0

to work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions