import pygame, sys pygame.init() display = pygame.display.set_mode((800, 800)) clock = pygame.time.Clock() current_time = 0 button_press_time = 0 small_font = pygame.font.SysFont("Corbel", 100) text = small_font.render("ball", True, (0,0,0)) text2 = small_font.render("sack", True, (0,0,0)) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: button_press_time = pygame.time.get_ticks() display.fill((255, 255, 255)) display.blit(text, (175, 320)) current_time = pygame.time.get_ticks() if current_time - button_press_time > 1000: display.blit(text2, (175, 410)) if current_time - button_press_time > 2000: display.fill((0,0,0)) print(f"current time: {current_time} button press time: {button_press_time}") pygame.display.flip() clock.tick(60)