Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: gibaoran on November 19, 2010, 01:12:47 am
-
How would I tell when the clock has gained a second best?
I am currently using:
:getTime->LB
:getTime->LA
:while LA(3)=LB(3)
:getTime->LB
://Second passed, do stuff
I am 100% certain there is a better way.
-
Here is my best idea...
startTmr→A
Repeat checkTmr(A
End
-
Ty :D. I never figured out what Repeat does, just looked it up though. Thanks again
-
Not a problem! I have made many programs that use time, so I just happened to have an answer :D
-
So it almost works, except my timer starts around this number 43438259, then counts up.
Maybe I am doing it wrong?
:ClrHome
:startTmr->A
:While 1
:Output(1,1,A
:Repeat checkTmr(A
:End
:A+1->A
:End
-
Oh so you want a timer, then? I thought you just wanted it to wait for a second. Do you want it to count down? If so, from where?
-
It is counting up. Can you reset the timer?
-
What are you trying to do, I am confused...?
-
If you want to reset it, just run StartTmr( again.
-
Or is this what you want:
:ClrHome
:startTmr→A
:Repeat 0
:Output(1,1,checkTmr(A
:End
-
Thats it. Thanks :D. (And for the confusion, I have one prg thats just a timer, and one that is eventually going to be an analog clock :P)