I was bored in calculus class so I thought I would give my shot at making a program. I was kind of messing around and though I would just make it so that I could hit enter to start and enter to stop so it would tell me how much time passed. After I got that pretty good, I decided I wanted it to display the time so I can see how much time has passed before I stop it. I know this probably isn't the best way to do things and probably contains unneeded code. The program works how I want it to, the only problem is that while inside of the loop, the display that shows the time increasing refreshes five or six times a second, making it barely readable. I was wondering if I could get any advice to make the code inside of the loop update once a second instead of five or six times a second. How can I slow a loop down to only repeat once a second? Thank you in advance.
ClrHome
Disp "PRESS ENTER TO"
Disp "START"
ClockOn
Pause
getTime→L2
startTmr→T
ClrHome
Repeat getKey
Disp "PRESS ANY KEY"
Disp "TO STOP"
Disp ""
checkTmr(T)→C
timeCnv(C)→L4
If L4(3)≠0
Output(4,10,L4(3)0
Output(6,1,"SECONDS: ")
Output(6,10,L4(4))
ClrHome
End
getTime→L1
(L1-L2)→L3
ClrHome
Disp "TOTAL TIME"
If L3(3)<0
(L3(2)-1)→L3(2)
If L3(3)<0
(60+L3(3))→L3(3)
If L3(2)≠0
Output(4,10,L3(2))
If L3(2)≠0
Output(4,1,"MINUTES: ")
Output(6,10,L3(3))
Output(6,1,"SECONDS: ")
Pause
DelVar L1
DelVar L2
DelVar L3
DelVar L4
ClrHome
Stop