INCLUDE "date.oxh" INCLUDE "const.oph" APP StopWatch,268451547 CAPTION "Stopwatch",1 ICON "stopwatch.mbm" ENDA PROC StopWatch: local s&,e&,d&,a%(2),micro$(6),k% local y&,mo&,day&,h&,mi&,se&,m& top:: cls font KFontCourierNormal13&,16 print "Press any key to start StopWatch v5.0" PRINT "Press Enter to Stop and Restart Programmed by Gary Ewer" PRINT "Press any key to see lap time Email: gary.ewer@earthling.net" PRINT "" PRINT "Press P to stop updating display" if get<>27 s&=DTNOW&: while 1 e&=DTNOW&: DTDateTimeDiff:(s&,e&,y&,mo&,day&,h&,mi&,se&,m&) at 30,15 micro$=num$(m&/1000,-3) print h&;":";mi&;":";se&;":"; micro$; print " " k%=key if k%=13 PRINT "" PRINT "Press any key to restart" GET GOTO Top:: elseif k%=%p or k%=%P at 12,15 PRINT "-----DISPLAY PAUSED - Press a key to resume-----" PRINT " " GET at 12,15 PRINT " " elseif k%=27 STOP elseif k% print"LAP TIME ";day&;"/";mo&;"/";y&,h&;":";mi&;":";se&;" and ";m&;" microseconds " endif endwh endif ENDP