示例#1
0
static void _getTime(uint64_t* sec, uint64_t* nsec)
{
	timespec ts;
	_clock_gettime(CLOCK_REALTIME, &ts);
	*sec = ts.tv_sec;
	*nsec = ts.tv_nsec;
}
示例#2
0
 static int clock_gettime(clockid_t clock_id, struct timespec *tp) {
   return _clock_gettime ? _clock_gettime(clock_id, tp) : -1;
 }