Altered the path for Cygwin to set the _ticksPerSecond to the correct value.
This commit is contained in:
@@ -138,10 +138,7 @@ class SG_EXPORT Timer {
|
|||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
# if defined(__ia64) || defined(__x86_64__)
|
# if defined(__powerpc)
|
||||||
#define CLK(x) ((x)=0)
|
|
||||||
|
|
||||||
# elif defined(__powerpc)
|
|
||||||
# ifndef __HAVE_POWERPC_GET_TBL
|
# ifndef __HAVE_POWERPC_GET_TBL
|
||||||
# define __HAVE_POWERPC_GET_TBL 1
|
# define __HAVE_POWERPC_GET_TBL 1
|
||||||
static inline unsigned long get_tbl(void)
|
static inline unsigned long get_tbl(void)
|
||||||
|
|||||||
@@ -44,7 +44,11 @@ const Timer* Timer::instance()
|
|||||||
|
|
||||||
if (_useStandardClock)
|
if (_useStandardClock)
|
||||||
{
|
{
|
||||||
|
#if defined(__CYGWIN__)
|
||||||
|
_secsPerTick = 1e-6; // gettimeofday()'s precision.
|
||||||
|
#else
|
||||||
_secsPerTick = (1.0 / (double) CLOCKS_PER_SEC);
|
_secsPerTick = (1.0 / (double) CLOCKS_PER_SEC);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user