You can use either ManualResetEventSlim.Wait(TimeSpan timeout)
or ManualResetEventSlim.Wait(int millisecondsTimeout)
.
But int.MaxValue
(2,147,483,647 - approx 24.85 days) is much less than TimeSpan.MaxValue.TotalMilliseconds
(922,337,203,685,477 - approx 10,675,199.11 days).
I suspect that there is a difference between usages of those overloads.