mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
timevar: we don't care about backward compatibility
* lib/timevar.h, lib/timevar.c (get_run_time, print_time): Remove.
This commit is contained in:
@@ -485,28 +485,3 @@ timevar_print (FILE *fp)
|
||||
|
||||
#endif /* defined HAVE_USER_TIME || defined HAVE_SYS_TIME || defined HAVE_WALL_TIME */
|
||||
}
|
||||
|
||||
/* Returns time (user + system) used so far by the compiler process,
|
||||
in microseconds. */
|
||||
|
||||
long
|
||||
get_run_time ()
|
||||
{
|
||||
struct timevar_time_def total_elapsed;
|
||||
timevar_get (TV_TOTAL, &total_elapsed);
|
||||
return total_elapsed.user + total_elapsed.sys;
|
||||
}
|
||||
|
||||
/* Prints a message to stderr stating that time elapsed in STR is
|
||||
TOTAL (given in microseconds). */
|
||||
|
||||
void
|
||||
print_time (const char *str, long total)
|
||||
{
|
||||
long all_time = get_run_time ();
|
||||
fprintf (stderr,
|
||||
_("time in %s: %ld.%06ld (%ld%%)\n"),
|
||||
str, total / 1000000, total % 1000000,
|
||||
all_time == 0 ? 0
|
||||
: (long) (((100.0 * (double) total) / (double) all_time) + .5));
|
||||
}
|
||||
|
||||
@@ -83,10 +83,6 @@ extern void timevar_stop (timevar_id_t);
|
||||
extern void timevar_get (timevar_id_t, struct timevar_time_def *);
|
||||
extern void timevar_print (FILE *);
|
||||
|
||||
/* Provided for backward compatibility. */
|
||||
extern long get_run_time (void);
|
||||
extern void print_time (const char *, long);
|
||||
|
||||
extern int timevar_report;
|
||||
|
||||
#endif /* ! _TIMEVAR_H */
|
||||
|
||||
Reference in New Issue
Block a user