From 2a8aef208ac43debc4b812d90be6e1cf530d3a8b Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Fri, 25 Mar 2016 18:28:39 +0000 Subject: [PATCH] timer functions added. FossilOrigin-Name: 2a4f22cc69cc63fee9f43c09ea67496a1cb37da4c9c5a9816372a66359d0b4b9 --- src/cw/dot11.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cw/dot11.h b/src/cw/dot11.h index e5f96a64..e215a770 100644 --- a/src/cw/dot11.h +++ b/src/cw/dot11.h @@ -106,12 +106,14 @@ static inline void dot11_get_address(uint8_t * dst, uint8_t *frame) extern uint64_t dot11_timer_offset; + static inline uint64_t dot11_timer_get(){ struct timeval tv; gettimeofday(&tv, NULL); return 1000000 * tv.tv_sec + tv.tv_usec - dot11_timer_offset; } + static inline void dot11_timer_set(uint64_t val) { struct timeval tv; gettimeofday(&tv, NULL);