[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
- [PATCH 00/12] timevar: clean up, for a possible integration to gnulib, Akim Demaille, 2018/09/22
- [PATCH 01/12] timevar: remove remains of GCC, Akim Demaille, 2018/09/22
- [PATCH 03/12] timevar: prefer #elif, Akim Demaille, 2018/09/22
- [PATCH 02/12] timevar: assume ANSI C, Akim Demaille, 2018/09/22
- [PATCH 04/12] timevar: we don't care about backward compatibility,
Akim Demaille <=
- [PATCH 05/12] timevar: rename init_timevar as timevar_init, Akim Demaille, 2018/09/22
- [PATCH 06/12] timevar: remove useless 'extern' for prototypes, Akim Demaille, 2018/09/22
- [PATCH 12/12] timevar: don't declare getrusage if we don't use it, Akim Demaille, 2018/09/22
- [PATCH 08/12] timevar: reduce scopes, Akim Demaille, 2018/09/22
- [PATCH 07/12] timevar: document in the header, not in the implementation, Akim Demaille, 2018/09/22
- [PATCH 10/12] timevar: introduce and use get_current_time, Akim Demaille, 2018/09/22
- [PATCH 11/12] timevar: get rid of a useless macro, Akim Demaille, 2018/09/22
- [PATCH 09/12] timevar: rename get_time as set_to_current_time, Akim Demaille, 2018/09/22