X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=os%2Fhptime.c;h=b93712baf44794db2b74b45548e710e72222dd0b;hb=e5523f6098d2f4d51c838459ce83423152cc8692;hp=33427e6b89c2c094c78c8ccd838ff972c9c6804d;hpb=660dbab0d8c8010a42a4f336f87ff362fd7eb457;p=bertos.git diff --git a/os/hptime.c b/os/hptime.c old mode 100755 new mode 100644 index 33427e6b..b93712ba --- a/os/hptime.c +++ b/os/hptime.c @@ -1,8 +1,33 @@ /** * \file * * * \brief Portable abstraction for high-resolution time handling (implementation) @@ -10,6 +35,7 @@ * \version $Id$ * \author Bernardo Innocenti */ + #include "hptime.h" #if defined(_WIN32) @@ -35,13 +61,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; }