mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Added clock_second() implementation to make th shell work
This commit is contained in:
parent
9a4e5dfabf
commit
2023a692d4
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: clock.c,v 1.1 2006/06/17 22:41:31 adamdunkels Exp $
|
||||
* $Id: clock.c,v 1.2 2008/07/09 09:34:29 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -53,6 +53,17 @@ clock_time(void)
|
||||
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
|
||||
clock_delay(unsigned int d)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user