cpu/native/periph/timer: fix undefined behaviour
This commit is contained in:
parent
e65a017f19
commit
f5345fbd38
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user