From 61739160fec9be43acb89e2643e7da75a9a17d32 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Tue, 18 Jul 2006 04:39:30 +0000 Subject: [PATCH] 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. --- stepmania/src/arch/Threads/Threads_Pthreads.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.cpp b/stepmania/src/arch/Threads/Threads_Pthreads.cpp index a642b33e6f..16d1001d3c 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.cpp +++ b/stepmania/src/arch/Threads/Threads_Pthreads.cpp @@ -215,8 +215,9 @@ MutexImpl *MakeMutex( RageMutex *pParent ) #include #include "arch/ArchHooks/ArchHooks_Unix.h" #else -typedef void *clockid_t; -static clockid_t CLOCK_REALTIME = NULL; +typedef int clockid_t; +static const clockid_t CLOCK_REALTIME = 0; +static const clockid_t CLOCK_MONOTONIC = 1; #endif namespace { @@ -271,6 +272,9 @@ namespace dlclose( pLib ); pLib = NULL; } +#elif defined(MACOSX) + void InitMonotonic() { bInitialized = true; } + clockid_t GetClock() { return CLOCK_MONOTONIC; } #else void InitMonotonic() {