batman-adv: Move is_out_of_time() to main.h for general use

Both translation tables and network coding use timeouts to do house
keeping, so we might as well share the function used to compare a
timestamp+timeout with current time.

For readability and simplicity, the function is renamed to
has_timed_out() and uses time_is_before_jiffies() instead of
time_after().

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
This commit is contained in:
Martin Hundebøll 2011-12-08 13:32:41 +01:00 • committed by Marek Lindner
commit a04ccd5970
2 changed files with 23 additions and 20 deletions