aubuti;184978 Wrote: 
> I've used a similar approach along with the linux `time' command to
> record scanning times under linux. Is there a DOS/Win equivalent to
> `time'? And no, I don't mean the DOS command that tells you what time
> it is, but one that tells you how long it takes to execute a given
> command.  Thanks.

Run the scan from a batch file.  You could use this to get the elapsed
time:


Code:
--------------------
    
  @echo off & setlocal enableextensions
  call :getTime StartTime
  ******* do your thing here *******
  call :getTime StopTime
  call :elapsedTime %StartTime% %StopTime% ElapsedTime
  call :formatTime %ElapsedTime% Elapsed
  echo Elapsed Time (hh:mm:ss): %Elapsed%
  goto :eof
  
  :: Return current time in 100ths of seconds
  :getTime
  for /f "tokens=1-4 delims=:.," %%T in ("%time%") do (
  set /a %1=%%T*360000+%%U*6000+%%V*100+%%W
  )
  goto :eof
  
  :: Calculate the difference between two times
  :elapsedTime
  :: account for passing midnight
  if %2 lss %1 set /a %2+=8640000
  set /a %3=%2-%1
  goto :eof
  
  :: Format a time period into hours:minutes:seconds.hundredths
  :formatTime
  setlocal enableextensions
  set /a hr=(%1)/360000
  set /a mn=(%1-360000*%hr%)/6000
  set /a sc=(%1-360000*%hr%-6000*%mn%)/100
  set /a hu=%1-360000*%hr%-6000*%mn%-%sc%*100
  set hr=0%hr%
  set mn=0%mn%
  set sc=0%sc%
  set hu=0%hu%
  endlocal&set %2=%hr:~-2%:%mn:~-2%:%sc:~-2%.%hu:~-2%
  goto :eof
--------------------


-- 
JJZolx

Jim
------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=33041

_______________________________________________
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to