Initial
This commit is contained in:
29
src/external/Time.h
vendored
Normal file
29
src/external/Time.h
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// Created by stewki on 09/05/2026.
|
||||
//
|
||||
|
||||
#ifndef SNAKE_TIME_H
|
||||
#define SNAKE_TIME_H
|
||||
#include <chrono>
|
||||
|
||||
typedef std::chrono::time_point<std::chrono::system_clock> timeAliased;
|
||||
|
||||
class Time {
|
||||
|
||||
public:
|
||||
Time();
|
||||
|
||||
void reset();
|
||||
|
||||
double getDeltaTime();
|
||||
|
||||
private:
|
||||
static timeAliased getCurrentTime();
|
||||
|
||||
private:
|
||||
timeAliased m_previousCurrentTime;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //SNAKE_TIME_H
|
||||
Reference in New Issue
Block a user