diff options
author | Florin Coras <fcoras@cisco.com> | 2019-10-22 19:01:39 -0700 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-11-28 09:30:38 +0000 |
commit | 67bb7ca00479e81bbc8770857d38e156a7b3824e (patch) | |
tree | 41fdf67260a395ccd2a025cc1ef8cadbbb17da78 /src/vppinfra/time.h | |
parent | 87e1bcdd7567f62fdd6510c26599580775871057 (diff) |
session tcp: refactor pacer time
Type: refactor
Change-Id: Ic1c3e1f7987702cd88972acc34849dc1f585d5fe
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit a8e71c8981f039588a7ca94e6ab66b4ebac784a5)
Diffstat (limited to 'src/vppinfra/time.h')
-rw-r--r-- | src/vppinfra/time.h | 7 |
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) { |