Skip to content

Conversation

@nitram509
Copy link

@nitram509 nitram509 commented Sep 13, 2022

motivation

I'm using this duration library in a project and tinkered around with long-running timers/durations.
I see an issue with potential wrong calculations when using seconds in combination with time.Duration builtin object.

https://en.wikipedia.org/wiki/Year_2038_problem

That said, on all 64bit machines, that should not be a problem, since int is compiled as 64bit.

What's the change

This PR introduces a breaking change, by using the type int64 instead of int in the Duration struct.
This is aligned with being compatible with Golang standard runtime using int64 as well.

Also, I took the freedom to add documentation per each field, which eases further the usage, as these single letters are not much self-explanatory.

also being compatible with golang standard runtime using int64 as well
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.

1 participant