--- title: "Internal Stop-Watch" type: "article" slug: "internal-stop-watch" url: "http://localhost/article/internal-stop-watch/" markdown_url: "http://localhost/article/internal-stop-watch.md" published_at: "2022-09-14T02:41:21+00:00" modified_at: "2026-07-22T12:44:06+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "In revising programs or comparing technique I often use the system variable FRAMES to measure elapsed time. Near the start of the program temporarily insert: POKE 23672,0:POKE 23673,0 That will reset the counters to 0. They will advance one unit per 1/60.1145 second. Near the end of the program, insert: PRINT PEEK 23762+256*PEEK 23673 For…" category: - name: "CATS Newsletter" slug: "cats-newsletter" taxonomy: "category" url: "http://localhost/category/periodicals/cats-newsletter/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "H. Edward Weppler" slug: "h-e-weppler" taxonomy: "indiv" url: "http://localhost/indiv/h-e-weppler/" publication_r: id: 35941 title: "CATS Newsletter" type: "periodical" url: "http://localhost/periodical/cats-newsletter/" authors: "H. E. Weppler" authors_r: - name: "H. Edward Weppler" slug: "h-e-weppler" taxonomy: "indiv" url: "http://localhost/indiv/h-e-weppler/" volume: "3" issue: "6" issues_articles: - id: 39605 title: "CATS v3 n6" type: "issue" url: "http://localhost/issue/cats-v3-n6/" pages: "9" pubdate: "September 1985" archive_link: false --- # Internal Stop-Watch In revising programs or comparing technique I often use the system variable FRAMES to measure elapsed time. Near the start of the program temporarily insert: ``` POKE 23672,0:POKE 23673,0 ``` That will reset the counters to 0. They will advance one unit per 1/60.1145 second. Near the end of the program, insert: ``` PRINT PEEK 23762+256*PEEK 23673 ``` For direct comparisons just note the number of units for each trial. If it is desired to measure directly in seconds, use: ``` PRNT INT((PEEK 23672+256*PEEK23673 + .5)*100/60.1145+.5)/100 ``` This provides averaging, since the counter jumps in 16ms steps while the elapse time is continuous. Then the result is rounded to two decimal places. It should be accurate to about .01 second.