118 |
_constants_ variable at run time, anyway? */ |
_constants_ variable at run time, anyway? */ |
119 |
#ifdef USE_TIMES |
#ifdef USE_TIMES |
120 |
static float ticks_to_msec; |
static float ticks_to_msec; |
121 |
#define TICKS_TO_MSEC (1 / (float)TICKS_PER_SECOND) |
#define TICKS_TO_MSEC (1.0 / TICKS_PER_SECOND) |
122 |
#endif |
#endif |
123 |
|
|
124 |
#ifdef USE_CLOCK |
#ifdef USE_CLOCK |
125 |
static float clocks_to_msec; |
static float clocks_to_msec; |
126 |
#define CLOCKS_TO_MSEC (1 / (float)CLOCKS_PER_SEC) |
#define CLOCKS_TO_MSEC (1.0 / CLOCKS_PER_SEC) |
127 |
#endif |
#endif |
128 |
|
|
129 |
#if IN_GCC |
#if IN_GCC |
236 |
} |
} |
237 |
} |
} |
238 |
|
|
239 |
/* Add the difference between STOP_TIME and START_TIME to TIMER. */ |
/* Add the difference between STOP and START to TIMER. */ |
240 |
|
|
241 |
static void |
static void |
242 |
timevar_accumulate (timer, start_time, stop_time) |
timevar_accumulate (timer, start, stop) |
243 |
struct timevar_time_def *timer; |
struct timevar_time_def *timer; |
244 |
struct timevar_time_def *start_time; |
struct timevar_time_def *start; |
245 |
struct timevar_time_def *stop_time; |
struct timevar_time_def *stop; |
246 |
{ |
{ |
247 |
timer->user += stop_time->user - start_time->user; |
timer->user += stop->user - start->user; |
248 |
timer->sys += stop_time->sys - start_time->sys; |
timer->sys += stop->sys - start->sys; |
249 |
timer->wall += stop_time->wall - start_time->wall; |
timer->wall += stop->wall - start->wall; |
250 |
} |
} |
251 |
|
|
252 |
/* Initialize timing variables. */ |
/* Initialize timing variables. */ |