StartTime = TIME$("ms")
FOR I = 0 TO 1000000
NEXT I
PRINT "Blank Loop: "; JBtimeSince$(StartTime)
PRINT ""
StartTime = TIME$("ms")
FOR I = 0 TO 1000000
SCAN
NEXT I
PRINT "SCAN Loop: "; JBtimeSince$(StartTime)
END
' FUNCTION '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Returns a string$ detailing how much time has expired since StartTime
' (e.g. 2 hrs, 14 min, 36.748 sec). If a time is zero it won't be included,
' except for 0 min, when hours are also present. Just set StartTime = TIME$("ms")
' at the beginning of a process and then call JBtimeSince$(StartTime) at the end.
' by CirothUngol
FUNCTION JBtimeSince$(StartTime)
LET EndTime = TIME$("ms")
LET Hours$ = " hrs, "
LET Minutes$ = " min, "
LET Seconds$ = " sec"
IF EndTime >= StartTime THEN
EndTime = EndTime - StartTime
ELSE
EndTime = EndTime + (86400000 - StartTime)
END IF
IF EndTime > 3600000 THEN
JBtimeSince$ = STR$(INT(EndTime / 3600000)) + Hours$
EndTime = EndTime MOD 3600000
END IF
IF (EndTime > 60000) OR (JBtimeSince$ <> "") THEN
JBtimeSince$ = JBtimeSince$ + STR$(INT(EndTime / 60000)) + Minutes$
EndTime = EndTime MOD 60000
END IF
JBtimeSince$ = JBtimeSince$ + STR$(INT(EndTime / 1000)) + "."
EndTime = EndTime MOD 1000
IF EndTime < 100 THEN JBtimeSince$ = JBtimeSince$ + "0"
IF EndTime < 10 THEN JBtimeSince$ = JBtimeSince$ + "0"
JBtimeSince$ = JBtimeSince$ + STR$(EndTime) + Seconds$
END FUNCTION
It's about 20 times faster in JB than LBB, and all of the hyper-repetitious loops in my program have one in there (for use with the "Abort" button). I did a global replace to comment them out and voilą, the LBB conversion runs at least 4-5 times faster than it's JB counterpart.