标签:
#include <mach/clock.h>
#include <mach/mach.h>
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), cclock);
long time = (mts.tv_sec * 1000 + mts.tv_nsec / 1000000);
标签:
原文地址:http://www.cnblogs.com/bGl1bGVp/p/5045810.html