Project

General

Profile

Bug #7500 ยป gc_timing.patch

tmm1 (Aman Karmani), 12/03/2012 11:32 AM

View differences:

gc.c
static double
getrusage_time(void)
{
#ifdef RUSAGE_SELF
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
struct timespec ts;
if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) {
return ts.tv_sec + ts.tv_nsec * 1e-9;
}
return 0.0;
#elif defined RUSAGE_SELF
struct rusage usage;
struct timeval time;
getrusage(RUSAGE_SELF, &usage);
    (1-1/1)