import pygame
from icecream import ic
from time import sleep


CLOCK = pygame.time.Clock()

testOn = True
timeStart = pygame.time.get_ticks()

while testOn:                                               # Pretend game loop.
    if ic(pygame.time.get_ticks() - timeStart) >= 2000:     # Once 2000 ms has elapsed.
        ic("Time has elapsed.")
        testOn = False

del testOn, timeStart

# ---------------------------------------------------------
sleep(2)
# ---------------------------------------------------------

timeStart = pygame.time.get_ticks()

while ic(pygame.time.get_ticks() - timeStart) < 2000:
    pass

ic("Time has elapsed.")