Classic Computer Magazine Archive COMPUTE! ISSUE 36 / MAY 1983 / PAGE 12

TI Clock

Since there is no realtime clock built into the Extended BASIC on the TI-99/4A, is there any coding scheme to simulate one?

John J. Mahoney

You can insert a FOR/NEXT loop wherever you wish to make some time elapse. The number of times the loop is executed can be varied depending on the timing requirements of your program. First choose some arbitrary number of times that you wish the program to run through the FOR/NEXT loop. Then time the results when the program is executed. If the time that transpires when the program is run is too long, simply use a smaller limit in the loop. This method depends on actual processing time, so if you add or delete program statements, be sure to adjust the FOR/NEXT limit accordingly.

For example, see how long FOR T = 1 TO 5000:NEXT T takes to finish. Then change the 5000 limit to suit your needs.