While VAL(MID$(TIME$,7,2))<>0
WEnd
Let STARTTIME$=TIME$
From INDEX=1 To 1000000
Next INDEX
Let ENDTIME$=TIME$
Let STARTVALUE=(VAL(MID$(STARTTIME$,1,2))*3600)+(VAL(MID$(STARTTIME$,4,2))*60)+VAL(MID$(STARTTIME$,7,2))
Let ENDVALUE=(VAL(MID$(ENDTIME$,1,2))*3600)+(VAL(MID$(ENDTIME$,4,2))*60)+VAL(MID$(ENDTIME$,7,2))
Let VALUE=ENDVALUE-STARTVALUE
Let HOUR=INT(VALUE/3600)
Let VALUE=VALUE-(HOUR*3600)
Let MINUTE=INT(VALUE/60)
Let VALUE=VALUE-(MINUTE*60)
Let SECOND=VALUE
Let WORK$=STR$(HOUR)
If LEN(WORK$)<2 Then Let WORK$="0"+WORK$
Let WORKTIME$=WORK$+":"
Let WORK$=STR$(MINUTE)
If LEN(WORK$)<2 Then Let WORK$="0"+WORK$
Let WORKTIME$=WORKTIME$+WORK$+":"
Let WORK$=STR$(SECOND)
If LEN(WORK$)<2 Then Let WORK$="0"+WORK$
Let WORKTIME$=WORKTIME$+WORK$
Cls
Print "Start time: "+STARTTIME$+"."
Print "  End time: "+ENDTIME$+"."
Print " Work time: "+WORKTIME$+"."
Print "Please press the ENTER key to quit."
While INKEY$<>CHR$(13)
WEnd