Skip to content

Commit

Permalink
native: implement hwtimer removal
Browse files Browse the repository at this point in the history
  • Loading branch information
LudwigKnuepfer committed Jun 30, 2014
1 parent 4859a71 commit 6567de6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cpu/native/hwtimer_cpu.c
Expand Up @@ -134,7 +134,14 @@ void schedule_timer(void)
}
if (next_timer == -1) {
DEBUG("schedule_timer(): no valid timer found - nothing to schedule\n");
// TODO: unset timer
struct itimerval null_timer;
null_timer.it_interval.tv_sec = 0;
null_timer.it_interval.tv_usec = 0;
null_timer.it_value.tv_sec = 0;
null_timer.it_value.tv_usec = 0;
if (setitimer(ITIMER_REAL, &null_timer, NULL) == -1) {
err(EXIT_FAILURE, "schedule_timer: setitimer");
}
return;
}

Expand Down

0 comments on commit 6567de6

Please sign in to comment.