Skip to content

Moment raw/atomic timestamps should be represented as AtomicI64 #1052

Description

@FelixMcFelix

/// Return the underlying timestamp for atomic storage or debugging.
pub(crate) fn raw(&self) -> u64 {
cfg_if! {
if #[cfg(all(not(feature = "std"), not(test)))] {
self.inner as u64
} else {
// Conversion here is truncating.
self.inner.as_nanos() as u64
}
}
}

hrtime_t is equivalent to i64, so we should not be exporting the raw timestamp value as a u64 (or using it in flow entries as an AtomicU64, for that matter).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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