pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1494:   #elif defined(HAVE_MACH_TASK_INFO_H) && defined(TASK_THREAD_TIMES_INFO)    {    static struct timeval last_check = { 0, 0 };    task_thread_times_info_data_t info;    mach_msg_type_number_t info_size = TASK_THREAD_TIMES_INFO_COUNT;       /* Before making an expensive call to task_info() we perform a    preliminary check that at least 35 ms real time has passed. If    not yet true we'll postpone the next check a full interval. */    struct timeval tv; -  if (ACCURATE_GETTIMEOFDAY(&tv) == 0) { +  ACCURATE_GETTIMEOFDAY(&tv); +  {   #ifdef INT64    static INT64 real_time_last_check = 0;    INT64 real_time_now = tv.tv_sec * 1000000 + tv.tv_usec;    if (real_time_now - real_time_last_check < 35000)    return;    real_time_last_check = real_time_now;   #else    static struct timeval real_time_last_check = { 0, 0 };    struct timeval diff;    timersub(&real_time_now, &real_time_last_check, &diff);