Skip to content

fix: MRT extended timestamp #2961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

maxime-peim
Copy link

@maxime-peim maxime-peim commented May 27, 2025

@maxime-peim maxime-peim force-pushed the dev/mrt-extended-timestamp branch from 3ff8c3b to 16908dd Compare May 28, 2025 08:56
func NewMRTHeader(timestamp time.Time, t MRTType, subtype MRTSubTyper, l uint32) (*MRTHeader, error) {
ms := uint32(0)
if t.HasExtendedTimestamp() {
ms = uint32(timestamp.UnixMicro() - timestamp.Unix()*1000000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timestamp.UnixMicro() % 1_000_000
more intuitive?

@fujita fujita merged commit 16908dd into osrg:master May 30, 2025
40 checks passed
@fujita
Copy link
Member

fujita commented May 30, 2025

Pushed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants