Fix for hill climbing not working sometimes (#52397)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Thu, 6 May 2021 23:39:12 +0000 (16:39 -0700)
committerGitHub <noreply@github.com>
Thu, 6 May 2021 23:39:12 +0000 (16:39 -0700)
commit6018ad01235e670e4420186f797c8eef45f4495e
tree3d60d1bd1c0cdb7b26a093768d33b943ed63b56c
parent89df0efae7e55476d8f20ce6aa7119768aa0ae10
Fix for hill climbing not working sometimes (#52397)

Updated the time intervals used in the hill climbing check to be unsigned to prevent wrap-around. This also prevents the check from failing when the current time is negative since the prior and next times are initialized to zero, and matches the previous implementation.

Fixes https://github.com/dotnet/runtime/issues/51935
src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.cs