Add rotating hash init function.
[bertos.git] / os / hptime.c
index 33427e6b89c2c094c78c8ccd838ff972c9c6804d..771832307efe1493b58a327ef4541ccf1132070d 100755 (executable)
@@ -10,6 +10,7 @@
  * \version $Id$
  * \author Bernardo Innocenti <bernie@develer.com>
  */
+
 #include "hptime.h"
 
 #if defined(_WIN32)
@@ -35,13 +36,14 @@ hptime_t hptime_get(void)
 
 #elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
 
-#include <sys/time.h>
+#include <sys/time.h> /* for gettimeofday() */
+#include <stddef.h> /* 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;
 }