/[bison]/bison/lib/timevar.c
ViewVC logotype

Diff of /bison/lib/timevar.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by eggert, Sun Oct 13 05:56:20 2002 UTC revision 1.4 by eggert, Sun Oct 20 05:34:55 2002 UTC
# Line 118  extern clock_t clock PARAMS ((void)); Line 118  extern clock_t clock PARAMS ((void));
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
# Line 236  get_time (now) Line 236  get_time (now)
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.  */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26