Merge remote-tracking branch 'RT-Thread/master'
This commit is contained in:
commit
fb27e8222c
|
@ -113,12 +113,12 @@ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
|
||||||
|
|
||||||
if (ms < 0)
|
if (ms < 0)
|
||||||
{
|
{
|
||||||
tick = RT_WAITING_FOREVER;
|
tick = (rt_tick_t)RT_WAITING_FOREVER;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tick = RT_TICK_PER_SECOND * (ms / 1000);
|
tick = RT_TICK_PER_SECOND * (ms / 1000);
|
||||||
tick += (RT_TICK_PER_SECOND * (ms%1000) + 999) / 1000;
|
tick += (RT_TICK_PER_SECOND * (ms % 1000) + 999) / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return the calculated tick */
|
/* return the calculated tick */
|
||||||
|
|
Loading…
Reference in New Issue