Handle the new clock api "correctly." At least differentiate CLOCK_MONOTONIC and CLOCK_REALTIME. Mac OS X uses the former for timers and is forced to use the latter for the pthread functions.
This commit is contained in:
@@ -215,8 +215,9 @@ MutexImpl *MakeMutex( RageMutex *pParent )
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include "arch/ArchHooks/ArchHooks_Unix.h"
|
#include "arch/ArchHooks/ArchHooks_Unix.h"
|
||||||
#else
|
#else
|
||||||
typedef void *clockid_t;
|
typedef int clockid_t;
|
||||||
static clockid_t CLOCK_REALTIME = NULL;
|
static const clockid_t CLOCK_REALTIME = 0;
|
||||||
|
static const clockid_t CLOCK_MONOTONIC = 1;
|
||||||
#endif
|
#endif
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@@ -271,6 +272,9 @@ namespace
|
|||||||
dlclose( pLib );
|
dlclose( pLib );
|
||||||
pLib = NULL;
|
pLib = NULL;
|
||||||
}
|
}
|
||||||
|
#elif defined(MACOSX)
|
||||||
|
void InitMonotonic() { bInitialized = true; }
|
||||||
|
clockid_t GetClock() { return CLOCK_MONOTONIC; }
|
||||||
#else
|
#else
|
||||||
void InitMonotonic()
|
void InitMonotonic()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user