summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-22 19:01:39 -0700
committerDave Barach <openvpp@barachs.net>2019-11-05 15:50:37 +0000
commita8e71c8981f039588a7ca94e6ab66b4ebac784a5 (patch)
treee1cb1e3ff299d16276c0060901705d446645a445 /src/vppinfra
parent0b6a857d85df97e887de7aaf00fd6bd2dae39bf8 (diff)
session tcp: refactor pacer time
Type: refactor Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/time.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vppinfra/time.h b/src/vppinfra/time.h
index 0327ce0fd05..ae738db1307 100644
--- a/src/vppinfra/time.h
+++ b/src/vppinfra/time.h
@@ -193,6 +193,13 @@ clib_cpu_time_now (void)
void clib_time_verify_frequency (clib_time_t * c);
+/* Define it as the type returned by clib_time_now */
+typedef f64 clib_time_type_t;
+typedef u64 clib_us_time_t;
+
+#define CLIB_US_TIME_PERIOD (1e-6)
+#define CLIB_US_TIME_FREQ (1.0/CLIB_US_TIME_PERIOD)
+
always_inline f64
clib_time_now_internal (clib_time_t * c, u64 n)
{