Sleep: Difference between revisions
Jump to navigation
Jump to search
m
→Approach 1: %RANDOM% + ping local
| Line 4: | Line 4: | ||
=== Approach 1: %RANDOM% + ping local === | === Approach 1: %RANDOM% + ping local === | ||
[https://stackoverflow.com/questions/8258087/bat-random-timeout batch file - .bat random timeout - Stack Overflow] | [https://stackoverflow.com/questions/8258087/bat-random-timeout batch file - .bat random timeout - Stack Overflow] | ||
* {{kbd | key=<nowiki>%RANDOM%</nowiki>}} returns an integer between 0 and 32767. | * {{kbd | key=<nowiki>%RANDOM%</nowiki>}} returns an integer between 0 and 32767<ref>[https://ss64.com/nt/syntax-random.html Random Numbers - Windows CMD - SS64.com]</ref>. | ||
* 60 is the range of values you want: 0 to 60. | * 60 is the range of values you want: 0 to 60. | ||
* 32768 is the range of values returned by {{kbd | key=<nowiki>%RANDOM%</nowiki>}} (0 to 32767). | * 32768 is the range of values returned by {{kbd | key=<nowiki>%RANDOM%</nowiki>}} (0 to 32767). | ||