[Modify] Polish it

master
sta 6 years ago
parent fa4bcaa0ba
commit 874e64d886

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

Loading…
Cancel
Save