8 #if defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
9 static double g_time_mult = 0.0;
13 #if defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
14 mach_timebase_info_data_t info;
15 mach_timebase_info(&info);
16 g_time_mult = 1.0e-9 * ((double)info.numer / (
double)info.denom);
23 #if defined(ABT_CONFIG_USE_CLOCK_GETTIME)
24 int ret = clock_gettime(CLOCK_REALTIME, p_time);
26 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
27 *p_time = mach_absolute_time();
28 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
29 int ret = gettimeofday(p_time, NULL);
39 #if defined(ABT_CONFIG_USE_CLOCK_GETTIME)
40 secs = ((double)p_time->tv_sec) + 1.0e-9 * ((double)p_time->tv_nsec);
41 #elif defined(ABT_CONFIG_USE_MACH_ABSOLUTE_TIME)
42 if (g_time_mult == 0.0)
44 secs = *p_time * g_time_mult;
45 #elif defined(ABT_CONFIG_USE_GETTIMEOFDAY)
46 secs = ((double)p_time->tv_sec) + 1.0e-6 * ((double)p_time->tv_usec);