Sleep: Difference between revisions

Jump to navigation Jump to search
183 bytes added ,  21 February 2024
m
mNo edit summary
Tags: Mobile edit Mobile web edit
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Sleep random seconds in programming
Sleep random seconds in programming


{{LanguageSwitcher | content = [[Sleep | EN]], [[Sleep in Madarian | 漢字]] }}
{{LanguageSwitcher | content = [[Sleep | EN]], [[Sleep in Mandarin | 漢字]] }}


== MS-DOS on Windows ==
== MS-DOS on Windows ==
Line 9: Line 9:


BAT file:
BAT file:
<pre>
<syntaxhighlight lang="Windows batch files">
REM print current date & time
REM print current date & time
ECHO %date% %time%
ECHO %date% %time%
Line 19: Line 19:
REM print current date & time
REM print current date & time
ECHO %date% %time%
ECHO %date% %time%
</pre>
</syntaxhighlight>


Instruction<ref>[https://stackoverflow.com/questions/8258087/bat-random-timeout batch file - .bat random timeout - Stack Overflow]</ref>
Instruction<ref>[https://stackoverflow.com/questions/8258087/bat-random-timeout batch file - .bat random timeout - Stack Overflow]</ref>
Line 25: Line 25:
* 55 is the range of values you want: 5 to 60.
* 55 is the range of values you want: 5 to 60.
* 32767 is the range of values returned by {{kbd | key=<nowiki>%RANDOM%</nowiki>}} (0 to 32767).
* 32767 is the range of values returned by {{kbd | key=<nowiki>%RANDOM%</nowiki>}} (0 to 32767).
* 5 is the minimum value you want. The original range of values is '0 to 60'. After plus 5 the range became '5 ~ 65'.
* 5 is the minimum value you want. The original range of values is '0 to 55'. After plus 5 the range became '5 ~ 65'.
* ping local address: {{kbd | key=<nowiki>/n <Count></nowiki>}} "Specifies the number of echo Request messages sent. The default is 4."<ref>[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ping time]</ref><ref>[https://stackoverflow.com/questions/735285/how-to-wait-in-a-batch-script windows xp - How to wait in a batch script? - Stack Overflow]</ref>
* ping local address: {{kbd | key=<nowiki>/n <Count></nowiki>}} "Specifies the number of echo Request messages sent. The default is 4."<ref>[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ping time]</ref><ref>[https://stackoverflow.com/questions/735285/how-to-wait-in-a-batch-script windows xp - How to wait in a batch script? - Stack Overflow]</ref>


Line 218: Line 218:
* [https://blog.gtwang.org/windows/excel-random-number-generation-formula/ Excel 產生各種亂數的公式整理與函數教學 - G. T. Wang]
* [https://blog.gtwang.org/windows/excel-random-number-generation-formula/ Excel 產生各種亂數的公式整理與函數教學 - G. T. Wang]
* [https://blog.miniasp.com/post/2009/06/24/Sleep-command-in-Batch 如何在批次檔(Batch)中實現 sleep 命令讓任務暫停執行 n 秒 | The Will Will Web]
* [https://blog.miniasp.com/post/2009/06/24/Sleep-command-in-Batch 如何在批次檔(Batch)中實現 sleep 命令讓任務暫停執行 n 秒 | The Will Will Web]
* [https://errerrors.blogspot.com/2024/02/implement-randbetween-using-round.html Excel 使用 RAND 函數實作 RANDBETWEEN 函數]


[[Category:Programming]] [[Category:PHP]] [[Category:MS-DOS]] [[Category:Bash]] [[Category:Tool]]
[[Category:Programming]] [[Category:PHP]] [[Category:MS-DOS]] [[Category:Bash]] [[Category:Tool]]

Navigation menu