Table of contents

  1. start the high-resolution timer
  2. read the running timer
  3. stop the timer
  4. toogles start/stop
  5. read the elapsed time
  6. Example

Microsecond timer, with a resolution greater than that (CPU speed).

start the high-resolution timer

call @timerhi start

read the running timer

echo !@timerhi!

stop the timer

call @timerhi stop

toogles start/stop

call @timerhi

read the elapsed time

echo !@timerhi!


call @timerhi start
echo Wait a little bit and press a key ...
pause > nul
call @timerhi stop
echo Elapsed microseconds: !@timerhi!