komefai / PS4Macro

Automation utility for PS4 Remote Play written in C#
http://blog.komefai.com
MIT License
378 stars 89 forks source link

Help wanted Random Sleep Time Range #76

Open baggypants71 opened 5 years ago

baggypants71 commented 5 years ago

Hi, Could someone tell me how to randomize the sleep with a range from 1000-3000ms.

Morty2323 commented 4 years ago

Put Random random = new Random(); once before your Sleep functions and then you're able to use this:

Sleep(random.Next(1000, 3001); //3001 not included => 1000 ms to 3000 ms

For further questions use Google because this is a C# related question.