Skip to content

Commit

Permalink
compile patch for boost 1.50 (thanks abma)
Browse files Browse the repository at this point in the history
related patch in spring:
spring/spring@1d57e16
  • Loading branch information
hoijui committed Jul 12, 2012
1 parent 706f555 commit 78f8a5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CScopedTimer.h
Expand Up @@ -12,6 +12,12 @@
#include "headers/HAIInterface.h"
#include "headers/HEngine.h"

#if (BOOST_VERSION >= 105000) // boost 1.50 renamed TIME_UTC to TIME_UTC_
#define boost_TIME_UTC_override boost::TIME_UTC_
#else
#define boost_TIME_UTC_override boost::TIME_UTC
#endif

#define PROFILE(x) CScopedTimer t(std::string(#x), ai->cb);

// Time interval in logic frames (1 min)
Expand All @@ -36,7 +42,7 @@ class CScopedTimer {

static unsigned int GetEngineRuntimeMSec() {
boost::xtime t;
boost::xtime_get(&t, boost::TIME_UTC);
boost::xtime_get(&t, boost_TIME_UTC_override);
const unsigned int milliSeconds = t.sec * 1000 + (t.nsec / 1000000);
return milliSeconds;
}
Expand Down

0 comments on commit 78f8a5e

Please sign in to comment.