Fixed compiler warnings
This commit is contained in:
parent
fc237101be
commit
bddd31abf2
4 changed files with 8 additions and 11 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: clock.c,v 1.2 2008/07/09 09:34:29 adamdunkels Exp $
|
||||
* $Id: clock.c,v 1.3 2009/09/09 21:11:24 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -39,6 +39,7 @@
|
|||
*/
|
||||
|
||||
#include "sys/clock.h"
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -46,9 +47,8 @@ clock_time_t
|
|||
clock_time(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
gettimeofday(&tv, &tz);
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||
}
|
||||
|
@ -57,9 +57,8 @@ unsigned long
|
|||
clock_seconds(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
gettimeofday(&tv, &tz);
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
return tv.tv_sec;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue