Is clock.schedule_interval() valid in pygame or only pygame zero?

Viewed 599

I'm following a tutorial that involves pygame zero and adapting it to create a pygame program, but am haing issues with my timer. The time_left variable is set to 10 earlier, here is the rest of the code to do with the timer:

def update_time_left():
    global time_left

    if time_left:
        time_left = time_left - 1
    else:
        game_over()
    
clock.schedule_interval(update_time_left, 1.0) 

will the clock.schedule_interval() part work in pygame? And if not is there anything else I can use instead?

1 Answers
Related