polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

hires.c (253B)


      1 
      2 #include <time.h>
      3 #include "common.h"
      4 #include <SDL2/SDL.h>
      5 
      6 double hires_time_in_seconds() {
      7     double ticks_per_sec = (double)SDL_GetPerformanceFrequency();
      8     double ticks = (double)SDL_GetPerformanceCounter();
      9     return ticks / ticks_per_sec;
     10 }