Added a function for converting a timesynchronized time to a local (rtimer) time
This commit is contained in:
parent
8a9b931a4b
commit
c8dccbbd40
2 changed files with 19 additions and 3 deletions
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: timesynch.c,v 1.2 2008/01/14 14:50:01 adamdunkels Exp $
|
||||
* $Id: timesynch.c,v 1.3 2008/01/23 15:07:05 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -80,6 +80,12 @@ timesynch_time_to_rtimer(rtimer_clock_t synched_time)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
rtimer_clock_t
|
||||
timesynch_rtimer_to_time(rtimer_clock_t rtimer_time)
|
||||
{
|
||||
return rtimer_time + offset;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
rtimer_clock_t
|
||||
timesynch_offset(void)
|
||||
{
|
||||
return offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue