Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
lnStart = SECONDS()
* Perform your main loop
DO WHILE .... or whatever
* Do some processing in the loop
....
....
* Now display the number of seconds
WAIT WINDOW "This process has taken " + TRANSFORM(SECONDS() - lnStart) NOWAIT
ENDDO
startt=DATETIME()
SCAN
IF (MOD(RECNO(),10)=0)
nAverage=RECNO()/(DATETIME()-startt)
timeleft=(RECC()-RECNO())/average
IF timeleft>59
cTimeleft=ALLTR(STR(timeleft/60))+' min'
ELSE
cTimeleft=ALLTR(STR(timeleft))+' sec'
ENDIF
THISFORM.label5.CAPTION= 'Adding row nr '+ALLTR(STR(RECNO()))+' ( '+ALLTR(STR(nAverage))+' rows/sek - Time left: '+cTimeleft+' ) ...'
IF (MOD(RECNO(),1000)=0)
DOEVENTS
ENDIF
ENDIF
* Adding row...
ENDSCAN
t_MessageTime = 2 && how often to display (in seconds)
t_PreSeconds = 0
scan
*
* code
*
if abs( seconds() - t_PreSeconds ) >= t_MessageTime
wait window "Working - " + time() nowait noclear
t_PreSeconds = seconds()
endif
endscan
wait clear && Clear the above message