Flush before computing accumulative power

This commit is contained in:
Adam Dunkels 2011-05-08 22:25:38 +02:00
parent ade10623de
commit 0e792fb742

View file

@ -63,6 +63,8 @@ compower_accumulate(struct compower_activity *e)
static uint32_t last_listen, last_transmit; static uint32_t last_listen, last_transmit;
uint32_t listen, transmit; uint32_t listen, transmit;
energest_flush();
listen = energest_type_time(ENERGEST_TYPE_LISTEN); listen = energest_type_time(ENERGEST_TYPE_LISTEN);
e->listen += listen - last_listen; e->listen += listen - last_listen;
last_listen = listen; last_listen = listen;