From 02ee5ff0cc9e6907cb4093bcf4d7bbbb1bc4db22 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 18 Nov 2004 09:19:15 +0000 Subject: [PATCH] Altered the path for Cygwin to set the _ticksPerSecond to the correct value. --- include/osg/Timer | 5 +---- src/osg/Timer.cpp | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/osg/Timer b/include/osg/Timer index 48bbe2dbc..fbae34b01 100644 --- a/include/osg/Timer +++ b/include/osg/Timer @@ -138,10 +138,7 @@ class SG_EXPORT Timer { #include -# if defined(__ia64) || defined(__x86_64__) - #define CLK(x) ((x)=0) - -# elif defined(__powerpc) +# if defined(__powerpc) # ifndef __HAVE_POWERPC_GET_TBL # define __HAVE_POWERPC_GET_TBL 1 static inline unsigned long get_tbl(void) diff --git a/src/osg/Timer.cpp b/src/osg/Timer.cpp index affcc9b76..aac28ee01 100644 --- a/src/osg/Timer.cpp +++ b/src/osg/Timer.cpp @@ -44,7 +44,11 @@ const Timer* Timer::instance() if (_useStandardClock) { + #if defined(__CYGWIN__) + _secsPerTick = 1e-6; // gettimeofday()'s precision. + #else _secsPerTick = (1.0 / (double) CLOCKS_PER_SEC); + #endif } else {