Make it compile on Linux. tz isn't used anyway.

This commit is contained in:
nvt-se 2007-11-28 13:01:02 +00:00
parent a725de0f79
commit 4a5ad23ff4
1 changed files with 3 additions and 5 deletions

View File

@ -30,7 +30,7 @@
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
* $Id: node.c,v 1.8 2007/11/17 18:09:18 adamdunkels Exp $ * $Id: node.c,v 1.9 2007/11/28 13:01:02 nvt-se Exp $
*/ */
#include "node.h" #include "node.h"
#include "contiki.h" #include "contiki.h"
@ -87,9 +87,8 @@ clock_time_t
node_time(void) node_time(void)
{ {
struct timeval tv; struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz); gettimeofday(&tv, NULL);
return tv.tv_sec * 1000 + tv.tv_usec / 1000/* + drift*/; return tv.tv_sec * 1000 + tv.tv_usec / 1000/* + drift*/;
} }
@ -98,9 +97,8 @@ unsigned long
node_seconds(void) node_seconds(void)
{ {
struct timeval tv; struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz); gettimeofday(&tv, NULL);
return tv.tv_sec; return tv.tv_sec;
} }