[PATCH] use monotonic clock for relative time for eloop if available

Jouni Malinen j
Wed Nov 20 14:10:27 PST 2013


On Wed, Nov 20, 2013 at 11:01:09AM +0100, Johannes Berg wrote:
> Relative time shouldn't be calculated based on gettimeofday
> because that clock can jump (e.g. when the time is adjusted
> by the system administrator.)
> 
> On systems where that is available, use CLOCK_BOOTTIME (on
> fairly recent Linux systems, this clock takes into account
> the time spend suspended) or CLOCK_MONOTONIC (on Linux and
> some POSIX systems, this clock is just freely running with
> no adjustments.)

Thanks, applied.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list