/* This function will calculate the tick from millisecond. */
rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
/* This function will calculate the tick from millisecond. */
rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
{
    rt_tick_t tick;
    if (ms < 0)
    {
        tick = (rt_tick_t)RT_WAITING_FOREVER;
    }
    else
    {
        tick = RT_TICK_PER_SECOND * (ms / 1000);
        tick += (RT_TICK_PER_SECOND * (ms % 1000) + 999) / 1000;
    }
    return tick;
}