mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-08 12:30:40 +00:00
Make it compile on Linux. tz isn't used anyway.
This commit is contained in:
parent
a725de0f79
commit
4a5ad23ff4
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user