timer functions added.

FossilOrigin-Name: 2a4f22cc69cc63fee9f43c09ea67496a1cb37da4c9c5a9816372a66359d0b4b9
This commit is contained in:
7u83@mail.ru 2016-03-25 18:28:39 +00:00
parent 7f7a66e4ca
commit 2a8aef208a
1 changed files with 2 additions and 0 deletions

View File

@ -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);