Advertisement
npocmaka

w32sleep

May 16th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. if   "%~1"=="" goto :help
  3. ECHO.%*| FINDSTR /R /X /C:"[0-9][0-9]*" >NUL || goto :help
  4. IF %~1 LSS  0 goto :help
  5.  
  6. setLocal
  7.     set /a adj=%~1/2+1
  8.     w32tm /stripchart /computer:localhost /period:1 /dataonly /samples:%adj% >nul 2>&1
  9. endLocal
  10.  
  11. goto :eof
  12. :help
  13. echo.
  14. echo %~n0
  15. echo Sleep emulator
  16. echo Wait for a specified number of seconds.
  17. echo.
  18. echo Usage:  CALL  %~n0  seconds
  19. echo.
  20. echo seconds  -  seconds to wait
  21. echo.
  22. echo.
  23. echo  by Vasil "npocmaka" Arnaudov
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement