aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Utilities/Timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/shared/Utilities/Timer.h')
-rwxr-xr-xsrc/server/shared/Utilities/Timer.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h
index 9db190f907f..ee27892ad34 100755
--- a/src/server/shared/Utilities/Timer.h
+++ b/src/server/shared/Utilities/Timer.h
@@ -19,31 +19,13 @@
#ifndef TRINITY_TIMER_H
#define TRINITY_TIMER_H
-#include "CompilerDefs.h"
-
-#if PLATFORM == PLATFORM_WINDOWS
-# include <ace/config-all.h>
-# include <mmsystem.h>
-# include <time.h>
-#else
-# if defined(__APPLE_CC__)
-# include <time.h>
-# endif
-# include <sys/time.h>
-# include <sys/timeb.h>
-#endif
+#include "Common.h"
-#if PLATFORM == PLATFORM_WINDOWS
-inline uint32 getMSTime() { return GetTickCount(); }
-#else
inline uint32 getMSTime()
{
- struct timeval tv;
- struct timezone tz;
- gettimeofday( &tv, &tz );
- return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
+ static const ACE_Time_Value ApplicationStartTime = ACE_OS::gettimeofday();
+ return (ACE_OS::gettimeofday() - ApplicationStartTime).msec();
}
-#endif
inline uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime)
{