Added clock_seconds implementation to minimal-net port
This commit is contained in:
parent
4875d5926d
commit
b18b84bb0e
1 changed files with 12 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: clock.c,v 1.1 2006/06/17 22:41:30 adamdunkels Exp $
|
* $Id: clock.c,v 1.2 2008/07/10 17:10:39 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,6 +53,17 @@ clock_time(void)
|
||||||
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
unsigned long
|
||||||
|
clock_seconds(void)
|
||||||
|
{
|
||||||
|
struct timeval tv;
|
||||||
|
struct timezone tz;
|
||||||
|
|
||||||
|
gettimeofday(&tv, &tz);
|
||||||
|
|
||||||
|
return tv.tv_sec;
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
clock_delay(unsigned int d)
|
clock_delay(unsigned int d)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue