diff --git a/cpu/native/periph/timer.c b/cpu/native/periph/timer.c index 6cf9557683..bd17926f5b 100644 --- a/cpu/native/periph/timer.c +++ b/cpu/native/periph/timer.c @@ -66,7 +66,7 @@ static struct itimerval itv; static unsigned long ts2ticks(struct timespec *tp) { /* TODO: check for overflow */ - return((tp->tv_sec * NATIVE_TIMER_SPEED) + (tp->tv_nsec / 1000)); + return(((unsigned long)tp->tv_sec * NATIVE_TIMER_SPEED) + (tp->tv_nsec / 1000)); } /**