From 69720f123160da72e90e0e0c1f9c52657892f527 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 22 Sep 2018 10:22:24 +0200 Subject: [PATCH] timevar: we don't care about backward compatibility * lib/timevar.h, lib/timevar.c (get_run_time, print_time): Remove. --- lib/timevar.c | 25 ------------------------- lib/timevar.h | 4 ---- 2 files changed, 29 deletions(-) diff --git a/lib/timevar.c b/lib/timevar.c index 99a79e1b..e80c2452 100644 --- a/lib/timevar.c +++ b/lib/timevar.c @@ -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)); -} diff --git a/lib/timevar.h b/lib/timevar.h index 37c2cae5..3a8d617a 100644 --- a/lib/timevar.h +++ b/lib/timevar.h @@ -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 */