I think I have what should be a correctly functioning stopwatch. I set up a timer to repeat a function that adds 1 to the tenths-of-a-second and when that equals 10, I reset it back to 0 and add one to the next part of the timer (seconds in this case).
The timer is: “tmr=timer.performWithDelay(100, change, 0)”
where “change” is the function that adds to the display. This should have it repeat every tenth of a second, right? But the timer seems to be off. It is much slower than my real watch. I have a feeling this is because it’s taking too long to calculate what should be done with the display, but I’m not sure how to fix it. Any help is appreciated. [import]uid: 30592 topic_id: 9446 reply_id: 309446[/import]
) [import]uid: 51516 topic_id: 9446 reply_id: 34613[/import]