X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=os%2Fhptime.c;h=771832307efe1493b58a327ef4541ccf1132070d;hb=71daf6b25bbb86414b47f9c21426a5441c2c3c75;hp=33427e6b89c2c094c78c8ccd838ff972c9c6804d;hpb=660dbab0d8c8010a42a4f336f87ff362fd7eb457;p=bertos.git diff --git a/os/hptime.c b/os/hptime.c index 33427e6b..77183230 100755 --- a/os/hptime.c +++ b/os/hptime.c @@ -10,6 +10,7 @@ * \version $Id$ * \author Bernardo Innocenti */ + #include "hptime.h" #if defined(_WIN32) @@ -35,13 +36,14 @@ hptime_t hptime_get(void) #elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) -#include +#include /* for gettimeofday() */ +#include /* for NULL */ hptime_t hptime_get(void) { struct timeval tv; - gettimeofday(&tv, 0); + gettimeofday(&tv, NULL); return (hptime_t)tv.tv_sec * HPTIME_TICKS_PER_SECOND + (hptime_t)tv.tv_usec; }