Skip to content

Commit

Permalink
Merge pull request #9145 from bergzand/pr/trickle/ms_us_swap
Browse files Browse the repository at this point in the history
trickle: remove msg_time member from struct
  • Loading branch information
cgundogan authored May 18, 2018
2 parents 4e95517 + aa84c3e commit 94541e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion sys/include/trickle.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ typedef struct {
trickle_callback_t callback; /**< callback function and parameter that
trickle calls after each interval */
msg_t msg; /**< the msg_t to use for intervals */
uint64_t msg_time; /**< interval in ms */
xtimer_t msg_timer; /**< xtimer to send a msg_t to the target
thread for a new interval */
} trickle_t;
Expand Down
4 changes: 2 additions & 2 deletions sys/trickle/trickle.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void trickle_interval(trickle_t *trickle)
/* old_interval == trickle->I / 2 */
trickle->t = random_uint32_range(old_interval, trickle->I);

trickle->msg_time = (trickle->t + diff) * MS_PER_SEC;
xtimer_set_msg64(&trickle->msg_timer, trickle->msg_time, &trickle->msg,
uint64_t msg_time = (trickle->t + diff) * US_PER_MS;
xtimer_set_msg64(&trickle->msg_timer, msg_time, &trickle->msg,
trickle->pid);
}

Expand Down

0 comments on commit 94541e1

Please sign in to comment.