|
/// 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).
opte/lib/opte/src/ddi/time.rs
Lines 96 to 106 in 16ef8c6
hrtime_tis equivalent toi64, so we should not be exporting the raw timestamp value as au64(or using it in flow entries as anAtomicU64, for that matter).