mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
✨ feat: spinlock should lock sched (#8360)
This commit is contained in:
@@ -169,6 +169,10 @@ RTM_EXPORT(rt_tick_from_millisecond);
|
||||
*/
|
||||
rt_weak rt_tick_t rt_tick_get_millisecond(void)
|
||||
{
|
||||
#if RT_TICK_PER_SECOND == 0 // make cppcheck happy
|
||||
#error "RT_TICK_PER_SECOND must be greater than zero"
|
||||
#endif
|
||||
|
||||
#if 1000 % RT_TICK_PER_SECOND == 0u
|
||||
return rt_tick_get() * (1000u / RT_TICK_PER_SECOND);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user