projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8567866
)
OS utils: Provide os_reltime_age()
author
Johannes Berg
<johannes.berg@intel.com>
Mon, 25 Nov 2013 20:56:02 +0000
(21:56 +0100)
committer
Jouni Malinen
<j@w1.fi>
Sun, 8 Dec 2013 02:55:58 +0000
(18:55 -0800)
This function calculates and returns the time passed since
a given timestamp.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
src/utils/os.h
patch
|
blob
|
history
diff --git
a/src/utils/os.h
b/src/utils/os.h
index
77dc6e3
..
6689d44
100644
(file)
--- a/
src/utils/os.h
+++ b/
src/utils/os.h
@@
-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