1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

Fix OSX build.

This commit is contained in:
Con Kolivas 2013-08-25 16:34:07 +10:00
parent 4340500573
commit 036c7b73f1

6
util.c
View File

@ -1011,11 +1011,11 @@ void cgtimer_time(cgtimer_t *ts_start)
clock_serv_t cclock; clock_serv_t cclock;
mach_timespec_t mts; 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); clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock); mach_port_deallocate(mach_task_self(), cclock);
ts->tv_sec = mts.tv_sec; ts_start->tv_sec = mts.tv_sec;
ts->tv_nsec = mts.tv_nsec; ts_start->tv_nsec = mts.tv_nsec;
} }
#else /* __MACH__ - Everything not linux/macosx/win32 */ #else /* __MACH__ - Everything not linux/macosx/win32 */
void cgtimer_time(cgtimer_t *ts_start) void cgtimer_time(cgtimer_t *ts_start)