[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/12] timevar: rename get_time as set_to_current_time
From: |
Akim Demaille |
Subject: |
[PATCH 09/12] timevar: rename get_time as set_to_current_time |
Date: |
Sat, 22 Sep 2018 13:49:45 +0200 |
* lib/timevar.c: here.
---
lib/timevar.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/timevar.c b/lib/timevar.c
index 62756588..5e42acda 100644
--- a/lib/timevar.c
+++ b/lib/timevar.c
@@ -157,7 +157,7 @@ static struct timevar_stack_def *unused_stack_instances;
element. */
static struct timevar_time_def start_time;
-static void get_time (struct timevar_time_def *);
+static void set_to_current_time (struct timevar_time_def *);
static void timevar_accumulate (struct timevar_time_def *,
struct timevar_time_def *,
struct timevar_time_def *);
@@ -167,7 +167,7 @@ static void timevar_accumulate (struct timevar_time_def *,
HAVE_WALL_TIME macros. */
static void
-get_time (struct timevar_time_def *now)
+set_to_current_time (struct timevar_time_def *now)
{
now->user = 0;
now->sys = 0;
@@ -244,7 +244,7 @@ timevar_push (timevar_id_t timevar)
/* What time is it? */
struct timevar_time_def now;
- get_time (&now);
+ set_to_current_time (&now);
/* If the stack isn't empty, attribute the current elapsed time to
the old topmost element. */
@@ -284,7 +284,7 @@ timevar_pop (timevar_id_t timevar)
/* What time is it? */
struct timevar_time_def now;
- get_time (&now);
+ set_to_current_time (&now);
/* Attribute the elapsed time to the element we're popping. */
struct timevar_stack_def *popped = stack;
@@ -320,7 +320,7 @@ timevar_start (timevar_id_t timevar)
abort ();
tv->standalone = 1;
- get_time (&tv->start_time);
+ set_to_current_time (&tv->start_time);
}
void
@@ -336,7 +336,7 @@ timevar_stop (timevar_id_t timevar)
abort ();
struct timevar_time_def now;
- get_time (&now);
+ set_to_current_time (&now);
timevar_accumulate (&tv->elapsed, &tv->start_time, &now);
}
@@ -351,14 +351,14 @@ timevar_get (timevar_id_t timevar,
if (tv->standalone)
{
struct timevar_time_def now;
- get_time (&now);
+ set_to_current_time (&now);
timevar_accumulate (elapsed, &tv->start_time, &now);
}
/* Or is TIMEVAR at the top of the timer stack? */
else if (stack->timevar == tv)
{
struct timevar_time_def now;
- get_time (&now);
+ set_to_current_time (&now);
timevar_accumulate (elapsed, &start_time, &now);
}
}
@@ -378,7 +378,7 @@ timevar_print (FILE *fp)
/* What time is it? */
struct timevar_time_def now;
- get_time (&now);
+ set_to_current_time (&now);
/* If the stack isn't empty, attribute the current elapsed time to
the old topmost element. */
--
2.19.0
- [PATCH 03/12] timevar: prefer #elif, (continued)
- [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, 2018/09/22
- [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 <=