Skip to content

Timestamp accuracy #26

Description

@jeinstei

I was having issues with the timestamp field losing accuracy when being calculated in a single line. I haven't looked much more in to it, but I needed to patch with the code below to get the accuracy back after calculation. I'm working with nanosecond resolution timestamp captures.

    @property
    def timestamp(self):
        # First, get the accuracy from the ts_resol option
        high_scaled = (self.timestamp_high << 32) * self.timestamp_resolution
        low_scaled  = (self.timestamp_low) * self.timestamp_resolution
        scaled = high_scaled + low_scaled
        return scaled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions