mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 00:45:22 +08:00
fix down alignment issue; fix the maximal number of rt_scheduler_lock_nest issue; fix rt_tick_from_millisecond issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@790 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
+2
-1
@@ -14,6 +14,7 @@
|
||||
* 2006-08-10 Bernard remove the last rt_schedule in rt_tick_increase
|
||||
* 2010-03-08 Bernard remove rt_passed_second
|
||||
* 2010-05-20 Bernard fix the tick exceeds the maximum limits
|
||||
* 2010-07-13 Bernard fix rt_tick_from_millisecond issue found by kuronca
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
@@ -95,7 +96,7 @@ void rt_tick_increase()
|
||||
rt_tick_t rt_tick_from_millisecond(rt_uint32_t ms)
|
||||
{
|
||||
/* return the calculated tick */
|
||||
return RT_TICK_PER_SECOND * (ms / 1000);
|
||||
return (RT_TICK_PER_SECOND * ms) / 1000 + (RT_TICK_PER_SECOND * ms) % 1000 ? 1:0;
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
Reference in New Issue
Block a user