You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Our API predates TimeSpan and uses int in many places to represent a duration, such as a timeout or retry. The problem is that the units of time only exist within either the name, or the Documentation Comments. This causes errors when people assume the wrong unit, based on units in use elsewhere. This is an example of primitive obsession, which is unnecessary in a strongly typed language.
Describe the solution you'd like
We should use a TimeSpan to represent a duration throughout our system to remove the class of errors that come from dealing with units of time.
Describe alternatives you've considered
The alternative here would be to use a standard such that the unit is always milliseconds. This was our previous approach but has broken down in places
The text was updated successfully, but these errors were encountered:
As you consider changing to TimeSpan instead of an integer duration, you might also consider moving from a DateTime to DateTimeOffset. The advantage of DateTimeOffset is that it facilitates moving between UTC internally and local time for display to a user.
Is your feature request related to a problem? Please describe.
Our API predates TimeSpan and uses int in many places to represent a duration, such as a timeout or retry. The problem is that the units of time only exist within either the name, or the Documentation Comments. This causes errors when people assume the wrong unit, based on units in use elsewhere. This is an example of primitive obsession, which is unnecessary in a strongly typed language.
Describe the solution you'd like
We should use a TimeSpan to represent a duration throughout our system to remove the class of errors that come from dealing with units of time.
Describe alternatives you've considered
The alternative here would be to use a standard such that the unit is always milliseconds. This was our previous approach but has broken down in places
The text was updated successfully, but these errors were encountered: