
#pragma once

#include <vulkan/vulkan.h>
#include "PathUtils.h"
#include "Utils.h"

struct FrameTimer
{
    float startTimeOfGame = 0;
    float timeThisFrame = 0;
    float timeLastFrame = 0;
    float timePassedSinceLastFrame = 0;
    float timePassedSinceStart = 0;

    //Constructor:
    FrameTimer(): startTimeOfGame(glfwGetTime()), timeThisFrame(startTimeOfGame), timeLastFrame(startTimeOfGame)
    {}
    
    void update()
    {
        timeLastFrame = timeThisFrame;
        timeThisFrame = glfwGetTime();
        timePassedSinceLastFrame =  timeThisFrame - timeLastFrame;
        timePassedSinceStart =  timeThisFrame - startTimeOfGame;
    }
};