diff options
| -rw-r--r-- | lib/event.c | 6 | ||||
| -rw-r--r-- | lib/frrevent.h | 6 | ||||
| -rw-r--r-- | lib/mgmt_be_client.c | 1 | ||||
| -rw-r--r-- | mgmtd/mgmt.h | 5 | 
4 files changed, 6 insertions, 12 deletions
diff --git a/lib/event.c b/lib/event.c index 6e55310b65..823894eecb 100644 --- a/lib/event.c +++ b/lib/event.c @@ -1848,12 +1848,6 @@ struct event *event_fetch(struct event_loop *m, struct event *fetch)  	return fetch;  } -static unsigned long timeval_elapsed(struct timeval a, struct timeval b) -{ -	return (((a.tv_sec - b.tv_sec) * TIMER_SECOND_MICRO) -		+ (a.tv_usec - b.tv_usec)); -} -  unsigned long event_consumed_time(RUSAGE_T *now, RUSAGE_T *start,  				  unsigned long *cputime)  { diff --git a/lib/frrevent.h b/lib/frrevent.h index 616fe131af..998727f079 100644 --- a/lib/frrevent.h +++ b/lib/frrevent.h @@ -155,6 +155,12 @@ struct cpu_event_history {  /* Struct timeval's tv_usec one second value.  */  #define TIMER_SECOND_MICRO 1000000L +static inline unsigned long timeval_elapsed(struct timeval a, struct timeval b) +{ +	return (((a.tv_sec - b.tv_sec) * TIMER_SECOND_MICRO) +		+ (a.tv_usec - b.tv_usec)); +} +  /* Event yield time.  */  #define EVENT_YIELD_TIME_SLOT 10 * 1000L /* 10ms */ diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c index b8aa07a793..d623886111 100644 --- a/lib/mgmt_be_client.c +++ b/lib/mgmt_be_client.c @@ -9,7 +9,6 @@  #include "debug.h"  #include "compiler.h"  #include "libfrr.h" -#include "mgmtd/mgmt.h"  #include "mgmt_be_client.h"  #include "mgmt_msg.h"  #include "mgmt_pb.h" diff --git a/mgmtd/mgmt.h b/mgmtd/mgmt.h index 019465980d..d46b1341ec 100644 --- a/mgmtd/mgmt.h +++ b/mgmtd/mgmt.h @@ -70,11 +70,6 @@ struct mgmt_master {  extern struct mgmt_master *mm;  /* Inline functions */ -static inline unsigned long timeval_elapsed(struct timeval a, struct timeval b) -{ -	return (((a.tv_sec - b.tv_sec) * TIMER_SECOND_MICRO) -		+ (a.tv_usec - b.tv_usec)); -}  /*   * Remove trailing separator from a string.  | 
