Use new experimental delay everywhere

This commit is contained in:
JustArchi
2015-11-04 04:31:27 +01:00
parent 5a3b132d5e
commit 34ffb975b6
3 changed files with 25 additions and 6 deletions

View File

@@ -35,10 +35,16 @@ using System.Threading.Tasks;
namespace ArchiSteamFarm {
internal static class Utilities {
private static readonly Random Random = new Random();
internal static async Task SleepAsync(int miliseconds) {
await Task.Delay(miliseconds).ConfigureAwait(false);
}
internal static int GetRandomDelay() {
return Random.Next(5, 16);
}
internal static ulong OnlyNumbers(string inputString) {
if (string.IsNullOrEmpty(inputString)) {
return 0;