Difference between revisions of "DOS Timer"

From PeformIQ Upgrade
Jump to navigation Jump to search
 
Line 23: Line 23:
This uses the program [http://www.performiq.com.au/kb/images/SleepMilliseconds.exe SleepMilliseconds.exe].  And [http://www.performiq.com.au/kb/images/SleepTest.batch here] is a copy of the BAT file.
This uses the program [http://www.performiq.com.au/kb/images/SleepMilliseconds.exe SleepMilliseconds.exe].  And [http://www.performiq.com.au/kb/images/SleepTest.batch here] is a copy of the BAT file.


[[Category:DOS]][[Category:Windows]]
[[Category:DOS]][[Category:WinXP]][[Category:Tools]]

Latest revision as of 11:08, 17 April 2008

BAT File

@ECHO OFF
for /F "tokens=2-4 delims=/ " %%a in ('date /t') do (set date=%%c%%b%%a)
for /F "tokens=1-3 delims=: " %%a in ('time /t') do (set time=%%a%%b%%c)
TaskLIST | FIND /i "SleepMilliseconds.exe" > NUL 2>&1
IF ERRORLEVEL 1 GOTO NOTRUNNING

:RUNNING
ECHO %date% %time% Failed to lauch SleepMilliseconds.exe A task of this name already exists in the task list >> sleeplog.log
GOTO END

:NOTRUNNING
ECHO %date% %time% Starting SleepMilliseconds.exe 10000 >> sleeplog.log
SleepMilliseconds.exe 10000
ECHO %date% %time% SleepMilliseconds.exe finished >> sleeplog.log
GOTO END

:END

This uses the program SleepMilliseconds.exe. And here is a copy of the BAT file.