I’m trying to implement a clock/timer. It works as of now but only problem is I need to make the frameRate to 1 but it affects the whole program’s frameRate. How do I change frameRate only for the clock function?
def clock():
global sec, minutes, hours, col
    
sec+=1
if(sec == 60):
    sec = 0
    minutes+=1
if(minutes == 60):
    minutes = 0
    hours+=1
if(hours == 24):
    hours = 0
    minutes = 0
    sec = 0
        
textSize(25)
fill(255, 0, 0)
text(floor(sec), 185, 110)
text(floor(minutes), 135, 110)
text(floor(hours), 85, 110)
if(sec % 2 == 0):
    col = color(0)
else:
    col = color(255, 0, 0)
fill(col)
textSize(30)
text(":", 120, 110)
text(":", 170, 110)
 
    