00001
00002
00003 #ifndef PLATFORM_TIME
00004 #define PLATFORM_TIME
00005
00006 #ifdef WIN32
00007
00008 #include <windows.h>
00009 #include <winbase.h>
00010 #define platform_time DWORD
00011 #define platform_GetTime GetTickCount
00012 #define platform_GetDuration(startTime, endTime) ((double) (endTime-startTime) / 1000.0)
00013
00014 #else
00015
00016 #include <time.h>
00017 #define platform_time time_t
00018 #define platform_GetTime time(NULL)
00019 #define platform_GetDuration(startTime, endTime) ((double) (endTime - startTime))
00020
00021 #endif
00022
00023 #endif