pygame.time.get_ticks() is it good code example
Example: pygame tick time
clock = pygame.time.Clock()
clock.tick(40)
# no more than 40 frames per second
clock = pygame.time.Clock()
clock.tick(40)
# no more than 40 frames per second