Skip to content

Conversation

@neithernut
Copy link
Contributor

Arbitrary SystemTimes are generated based on arbitrary Durations by adding or subtracting from UNIX_EPOCH. If we happen to generate big Durations, this could cause an overflow.

This change avoids this problem by resorting to ever smaller durations in case of an overflow.

Fixes #321.

Arbitrary `SystemTime`s are generated based on arbitrary `Duration`s by
adding or subtracting from `UNIX_EPOCH`. If we happen to generate big
`Duration`s, this could cause an overflow.

This change avoids this problem by resorting to ever smaller durations
in case of an overflow.
@neithernut neithernut force-pushed the systemtime-no-overflow branch from 4623f40 to 2e4ba41 Compare March 10, 2025 08:27
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.

Durations's Arbitrary instance is dependant on Gen's size

1 participant