You've already forked linux-packaging-mono
Imported Upstream version 5.16.0.100
Former-commit-id: 38faa55fb9669e35e7d8448b15c25dc447f25767
This commit is contained in:
parent
0a9828183b
commit
7d7f676260
@ -179,5 +179,15 @@ namespace System.Threading
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
static extern int SignalAndWait_Internal (IntPtr toSignal, IntPtr toWaitOn, int ms);
|
||||
|
||||
internal static int ToTimeoutMilliseconds(TimeSpan timeout)
|
||||
{
|
||||
var timeoutMilliseconds = (long)timeout.TotalMilliseconds;
|
||||
if (timeoutMilliseconds < -1 || timeoutMilliseconds > int.MaxValue)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(timeout), SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
|
||||
}
|
||||
return (int)timeoutMilliseconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user