01 While VAL(MID$(TIME$,7,2))<>0
02 WEnd
03 Let STARTTIME$=TIME$
04 From INDEX=1 To 1000000
05 Next INDEX
06 Let ENDTIME$=TIME$
07 Let STARTVALUE=(VAL(MID$(STARTTIME$,1,2))*3600)+(VAL(MID$(STARTTIME$,4,2))*60)+VAL(MID$(STARTTIME$,7,2))
08 Let ENDVALUE=(VAL(MID$(ENDTIME$,1,2))*3600)+(VAL(MID$(ENDTIME$,4,2))*60)+VAL(MID$(ENDTIME$,7,2))
09 Let VALUE=ENDVALUE-STARTVALUE
10 Let HOUR=INT(VALUE/3600)
11 Let VALUE=VALUE-(HOUR*3600)
12 Let MINUTE=INT(VALUE/60)
13 Let VALUE=VALUE-(MINUTE*60)
14 Let SECOND=VALUE
15 Let WORK$=STR$(HOUR)
16 If LEN(WORK$)<2 Then Let WORK$="0"+WORK$
17 Let WORKTIME$=WORK$+":"
18 Let WORK$=STR$(MINUTE)
19 If LEN(WORK$)<2 Then Let WORK$="0"+WORK$
20 Let WORKTIME$=WORKTIME$+WORK$+":"
21 Let WORK$=STR$(SECOND)
22 If LEN(WORK$)<2 Then Let WORK$="0"+WORK$
23 Let WORKTIME$=WORKTIME$+WORK$
24 Cls
25 Print "Start time: "+STARTTIME$+"."
26 Print "  End time: "+ENDTIME$+"."
27 Print " Work time: "+WORKTIME$+"."
28 Print "Please press the ENTER key to quit."
29 While INKEY$<>CHR$(13)
30 WEnd