Use the clock_second() function to get time in seconds
This commit is contained in:
parent
082efade5b
commit
9cc5a0098e
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: shell.c,v 1.10 2008/07/03 21:15:12 adamdunkels Exp $
|
* $Id: shell.c,v 1.11 2008/07/07 23:46:12 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -520,13 +520,13 @@ unsigned long
|
|||||||
shell_time(void)
|
shell_time(void)
|
||||||
{
|
{
|
||||||
/* XXX todo: fix process to avoid wrap-around */
|
/* XXX todo: fix process to avoid wrap-around */
|
||||||
return clock_time() / CLOCK_SECOND + time_offset;
|
return clock_seconds() + time_offset;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
shell_set_time(unsigned long seconds)
|
shell_set_time(unsigned long seconds)
|
||||||
{
|
{
|
||||||
time_offset = seconds - clock_time() / CLOCK_SECOND;
|
time_offset = seconds - clock_seconds();
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user