Tset 1, 0 // by default counter is off Count@ = 0 // initializes the timer to 0 Min@ = 0 // initializes the timer to 0 Ontimer 1,"@counter()" Onchange "count", "@timecheck()" Onchange "start", "@Start_timer()" Function Start_Timer() If start@ = 1 Then Tset 1,1 // turns the timer on if the start is initialized Count@ = 0 // initializes the timer to 0 Min@ = 0 // initializes the timer to 0 Else Tset 1,0 // turns the timer off if start isn't initialized Endif Endfn Function Counter() Count@ = Count@+1 // counts up once per second If count@ > 59 Then min@ = min@+1 //increments the minute every 60 seconds count@ = 0 // makes it so that when it hits 59 seconsd it goes back to 0 Else If min@ > 59 Then hour@ = hour@+1 //increments the hour every 60 minutes min@ = 0 // makes it so that when it hits 59 minutes it goes back to 0 Endif Endif Endfn Function timecheck() Runtime@ = STR$ Hour@ + ":" + STR$ Min@ + ":" + STR$ Count@ Endfn