Integrated changes for MacOSX, submitted by Phil Atkin, with small mods by

Robert Osfield to maintain compatability under Linux.
This commit is contained in:
Robert Osfield
2001-10-03 21:44:07 +00:00
parent 1ebddc2af7
commit 2c6e85442b
29 changed files with 395 additions and 91 deletions

View File

@@ -180,7 +180,23 @@ using namespace osg;
_secsPerClick = (double)(cycleval)* 1e-12;
}
}
#elif defined (__APPLE_CC__) // MACOSX PJA
#include <Carbon/Carbon.h> // do I really have to link against the Carbon framework just for this?
Timer_t Timer::tick(void)
{
UnsignedWide usecs;
Microseconds(&usecs);
return (usecs.hi * 4294967296.0) + usecs.lo;
}
Timer::Timer( void )
{
_useStandardClock = false;
_secsPerClick = 1e-6; // Carbon timer's precision.
}
#elif defined(unix)