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
Publicly expose the useful constants that `TimeSpan` had internally declared since they're rooted in hard reality and not changeable, and quite useful elsewhere. Everything is a `long` except `HoursPerDay` because that is useful in many non-TimeSpan contexts and rarely would overflow.
Added /// documentation for newly public constants and updated _System.Runtime.cs_ assembly API reference.
Use the newly exposed values in all the runtime places similar constants are declared in runtime **EXCEPT** did not use the `TimeSpan` constant in _EventLogInternal.cs_ since that source is also built for older frameworks, leave existing internal constant.
In _Calendar.cs_, use an `int` cast at the call-sites to `Add` method to prevent performance degradation, these calls are known not to overflow.
Fixes#94545
Debug.Assert(LeapSecondCache.ValidityPeriodInTicks<TicksPerDay-TicksPerSecond,"Leap second cache validity window should be less than 23:59:59.");
197
+
Debug.Assert(LeapSecondCache.ValidityPeriodInTicks<TimeSpan.TicksPerDay-TimeSpan.TicksPerSecond,"Leap second cache validity window should be less than 23:59:59.");
0 commit comments