mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
OS utils: Provide os_reltime_age()
This function calculates and returns the time passed since a given timestamp. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
8567866d75
commit
ed0ebee14f
@ -86,6 +86,16 @@ static inline void os_reltime_sub(struct os_reltime *a, struct os_reltime *b,
|
||||
}
|
||||
|
||||
|
||||
static inline void os_reltime_age(struct os_reltime *start,
|
||||
struct os_reltime *age)
|
||||
{
|
||||
struct os_reltime now;
|
||||
|
||||
os_get_reltime(&now);
|
||||
os_reltime_sub(&now, start, age);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* os_mktime - Convert broken-down time into seconds since 1970-01-01
|
||||
* @year: Four digit year
|
||||
|
Loading…
Reference in New Issue
Block a user