import time

import pygame

pygame.init()

WIDTH = 360
HEIGHT = 480

screen = pygame.display.set_mode((WIDTH,HEIGHT))
pygame.display.set_caption('plant_vs_zoomie')

# Colors (R, G, B)
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)

myfont = pygame.font.Font(None,60)
# textImgage = myfont.render('pygame',True,WHITE)

FPS = 60
clock = pygame.time.Clock()
running = True
count = 0
start = time.time()
while running:
    clock.tick(FPS)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False

    count += 1
    now = time.time()
    fps = count / (now -start)
    fpsImgage = myfont.render(str(fps), True, WHITE)

    screen.fill(BLACK)
    screen.blit(fpsImgage,(100,100))
    pygame.display.flip()
