bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 04/12] timevar: we don't care about backward compatibility


From: Akim Demaille
Subject: [PATCH 04/12] timevar: we don't care about backward compatibility
Date: Sat, 22 Sep 2018 13:49:40 +0200

* 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 6d2a1640..0b5047e5 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 */
-- 
2.19.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]