summaryrefslogtreecommitdiff
path: root/src/include/timing.h
blob: 238d11d2b6bdf27a606838fdbdda2b0c899239f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef TIME_H
#define TIME_H

#include "SDL/SDL.h"
#include "data_types.h"

#define TICK_DURATION_MS 30

tick_t getGameCurrentTick(Uint32 startTime_ms);
int waitForNextTick(Uint32 timeBefore_ms, Uint32 drift_ms);
Uint32 updateDriftOnEventReception(tick_t localCurrentTick, tick_t eventServerTick);

#endif /*TIME_H*/