Reverted the timer_expired() back to the previous version (which should be correct). Removed the definition of CLOCK_LT() because it seems to only cause problems.

This commit is contained in:
adamdunkels 2009-01-24 15:20:11 +00:00
parent 3a4a961ff5
commit e346d8cf95
2 changed files with 6 additions and 4 deletions

View file

@ -42,7 +42,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: timer.c,v 1.4 2008/09/21 08:58:05 adamdunkels Exp $
* $Id: timer.c,v 1.5 2009/01/24 15:20:11 adamdunkels Exp $
*/
#include "contiki-conf.h"
@ -121,7 +121,7 @@ timer_restart(struct timer *t)
int
timer_expired(struct timer *t)
{
return CLOCK_LT(clock_time(), t->start + t->interval);
return (clock_time_t)(clock_time() - t->start) >= (clock_time_t)t->interval;
}
/*---------------------------------------------------------------------------*/
/**