[Modify] Polish it

This commit is contained in:
sta 2019-09-10 21:36:28 +09:00
parent fa4bcaa0ba
commit 874e64d886

View File

@ -1812,8 +1812,14 @@ namespace WebSocketSharp
/// </param>
public static void Times (this long n, Action action)
{
if (n > 0 && action != null)
((ulong) n).times (action);
if (n <= 0)
return;
if (action == null)
return;
for (long i = 0; i < n; i++)
action ();
}
/// <summary>