Skip to content

Commit

Permalink
Merge pull request #570 from nliviu/fix-msecs_left
Browse files Browse the repository at this point in the history
Fix msecs_left in mgos_get_timer_info()
  • Loading branch information
rojer authored Jan 27, 2021
2 parents 00b9fca + 793c84d commit 7fecd3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mgos_timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ bool mgos_get_timer_info(mgos_timer_id id, struct mgos_timer_info *info) {
return false;
}
info->interval_ms = ti->interval_ms;
info->msecs_left = (ti->next_invocation - mg_time()) * 1000;
info->msecs_left = (ti->next_invocation - mgos_uptime()) * 1000;
info->cb = ti->cb;
info->cb_arg = ti->cb_arg;
mgos_runlock(s_timer_data_lock);
Expand Down

0 comments on commit 7fecd3c

Please sign in to comment.