medfall

A super great game engine
Log | Files | Refs

darwin_time.h (268B)


      1 #pragma once
      2 
      3 #include <mach/mach_time.h>
      4 
      5 #include "intrinsics.h"
      6 
      7 inline double get_time() {
      8 	mach_timebase_info_data_t freq;
      9 	mach_timebase_info( &freq );
     10 
     11 	u64 ticks = mach_absolute_time();
     12 
     13 	return double( ticks ) * ( freq.numer / 1e9 ) / double( freq.denom );
     14 }