mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
22 lines
474 B
C++
22 lines
474 B
C++
#pragma once
|
|
|
|
namespace util {
|
|
class Clock {
|
|
int tickRate;
|
|
int tickParts;
|
|
|
|
float tickTimer = 0.0f;
|
|
int tickId = 0;
|
|
int currentTickPart = 0;
|
|
int lastPartsStart = 0;
|
|
public:
|
|
Clock(int tickRate, int tickParts);
|
|
|
|
int update(float delta);
|
|
|
|
int getParts() const;
|
|
int getTickRate() const;
|
|
int getTickId() const;
|
|
int convertPart(int index) const;
|
|
};
|
|
}
|