utils: use clock_get_time() for clock_gettime() on Apple.
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 21 Jan 2015 13:21:28 +0000 (21:21 +0800)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 21 Jan 2015 19:11:30 +0000 (20:11 +0100)
commitad9aa180d30ebf2ae91e3cc656c814693bb921ca
treea90c65cd3fdcb590bdfd4b6d4fb7eb18a534d33e
parent08c27ceb016ae42235c413a7693f18f437cd4972
utils: use clock_get_time() for clock_gettime() on Apple.

It turns out that mach_absolute_time() is not monotonic at all.  While
at it, convert the CLOCK_REALTIME implementation to using
clock_get_time() as well.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
utils.c
utils.h