[PATCH v1] interval: Remove unused usec_timer functions

Gert Doering <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
From: Frank Lichtenheld <[email protected]>

These have never been used in the git history.
Probably OpenVPN 1.x remnants.

Identified by cppcheck.

Change-Id: Icfb109714b42cab0af34f21f8fc8972059091c8e
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1862
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1862
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]>

        
diff --git a/src/openvpn/interval.h b/src/openvpn/interval.h
index f6d3503..59051bd 100644
--- a/src/openvpn/interval.h
+++ b/src/openvpn/interval.h
@@ -255,47 +255,4 @@
  */
 bool event_timeout_trigger(struct event_timeout *et, struct timeval *tv, int et_const_retry);
 
-/*
- * Measure time intervals in microseconds
- */
-
-#define USEC_TIMER_MAX 60 /* maximum interval size in seconds */
-
-#define USEC_TIMER_MAX_USEC (USEC_TIMER_MAX * 1000000)
-
-struct usec_timer
-{
-    struct timeval start;
-    struct timeval end;
-};
-
-#ifdef HAVE_GETTIMEOFDAY
-
-static inline void
-usec_timer_start(struct usec_timer *obj)
-{
-    CLEAR(*obj);
-    openvpn_gettimeofday(&obj->start, NULL);
-}
-
-static inline void
-usec_timer_end(struct usec_timer *obj)
-{
-    openvpn_gettimeofday(&obj->end, NULL);
-}
-
-#endif /* HAVE_GETTIMEOFDAY */
-
-static inline bool
-usec_timer_interval_defined(struct usec_timer *obj)
-{
-    return obj->start.tv_sec && obj->end.tv_sec;
-}
-
-static inline int
-usec_timer_interval(struct usec_timer *obj)
-{
-    return tv_subtract(&obj->end, &obj->start, USEC_TIMER_MAX);
-}
-
 #endif /* INTERVAL_H */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.