Golias Engine
A C++ 20 'game engine' built with SDL3 with wide platform support.
timer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "stdafx.h"
4 
14 class Timer {
15 public:
16  double delta;
17  double elapsed_time;
18 
19  int get_fps() const;
20 
21  void start();
22 
23  void tick();
24 
25 private:
26  Uint64 now;
27  Uint64 last;
28 };
Definition: timer.h:14
int get_fps() const
Definition: timer.cpp:4
void start()
Definition: timer.cpp:11
void tick()
Definition: timer.cpp:18
double delta
Definition: timer.h:16
double elapsed_time
Definition: timer.h:17