00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __SYSTIME_H__
00012 #define __SYSTIME_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #if defined(_XBOX)
00016 #include <xtl.h>
00017 #else
00018 #if defined(_WIN32)
00019 #include <windows.h>
00020 #endif
00021 #endif
00022
00023 #if defined(_PS2)
00024 #include <eekernel.h>
00025 #endif
00026
00027 namespace RNReplicaNet
00028 {
00029
00033 class REPNETEXPORTAPI SysTime
00034 {
00035 public:
00036
00040 SysTime();
00041
00045 virtual ~SysTime();
00046
00050 float FloatTime(void);
00051
00055 static unsigned int GetTickCount(void);
00056
00057 private:
00058 #if defined(_WIN32)
00059 double pfreq;
00060 double curtime;
00061 double lastcurtime;
00062 int lowshift;
00063 int sametimecount;
00064 unsigned int oldtime;
00065
00066
00067 LARGE_INTEGER startticktime;
00068 LARGE_INTEGER PerformanceFreq;
00069 #endif
00070 #if defined(_PS2)
00071 u_long mPS2Initial;
00072 #endif
00073 int first;
00074 unsigned int mBaseTickCount;
00075 int mSecBase;
00076 };
00077
00078 }
00079
00080 #endif //#ifndef __SYSTIME_H__