Skip to content
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

pcap timestamp bugfix #513

Merged
merged 1 commit into from
Jul 1, 2021
Merged

pcap timestamp bugfix #513

merged 1 commit into from
Jul 1, 2021

Conversation

JakkuSakura
Copy link
Contributor

fixes #512

Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

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

Nice catch! Thank you

@Dirbaio Dirbaio merged commit 1134eb2 into smoltcp-rs:master Jul 1, 2021
@JakkuSakura
Copy link
Contributor Author

Consider use microsecond as internal unit?

@Dirbaio
Copy link
Member

Dirbaio commented Jul 1, 2021

Instant is in ms because with us it'd overflow after aprox 70 minutes, which might be too short for some use cases. Sometimes you want TCP timeouts in the order of hours.

Edit: they're in u64 so no, they wouldn't overflow that fast. Maybe!

@JakkuSakura
Copy link
Contributor Author

JakkuSakura commented Jul 1, 2021

Edit: they're in u64 so no, they wouldn't overflow that fast. Maybe!

I'm using nanoseconds in i64 in my program, and it will overflow after 292 years since 1970. us would give you 292471 years.

I would like to file a PR on it.

@JakkuSakura JakkuSakura deleted the pcap_timestamp_bugfix branch July 4, 2021 10:00
bors bot added a commit that referenced this pull request Oct 5, 2021
514: use micros in Instant and Duration r=Dirbaio a=qiujiangkun

This improves precision everywhere, especially pcap
#513

Co-authored-by: qiujiangkun <qiujiangkun@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect time format for pcap leads to wierd wireshark graph
2 participants