Commit 036c7b73f1244e52a8aedf3990ecf862d03310f4

Con Kolivas 2013-08-25T16:34:07

Fix OSX build.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/util.c b/util.c
index 504bcb1..d9d8db0 100644
--- a/util.c
+++ b/util.c
@@ -1011,11 +1011,11 @@ void cgtimer_time(cgtimer_t *ts_start)
 	clock_serv_t cclock;
 	mach_timespec_t mts;
 
-	host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
+	host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
 	clock_get_time(cclock, &mts);
 	mach_port_deallocate(mach_task_self(), cclock);
-	ts->tv_sec = mts.tv_sec;
-	ts->tv_nsec = mts.tv_nsec;
+	ts_start->tv_sec = mts.tv_sec;
+	ts_start->tv_nsec = mts.tv_nsec;
 }
 #else /* __MACH__ - Everything not linux/macosx/win32 */
 void cgtimer_time(cgtimer_t *ts_start)