timer - Operating the bottom timer#

Adaptation status unknown

Note

This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!

timer.mdelay(timeout)#

Hard blocking specified duration

Parameters

Incoming Value Type

Explanation

int

Blocking duration, unit ms, up to 1024ms, is strongly recommended not to exceed 200ms

Return Value

return value type

explanation

nil

No return value

Examples

-- No luat code is executed during this period, including the underlying message handling mechanism.
-- This method is usually not used unless you know exactly what will happen.
timer.mdelay(10)

timer.udelay(timeout)#

Hard blocking specifies long but us level, not very accurate

Parameters

Incoming Value Type

Explanation

int

Blocking duration, in us, maximum 3000us

Return Value

return value type

explanation

nil

No return value

Examples

-- This method is usually not used unless you know exactly what will happen.
-- This API was added on 2023.05.18
timer.udelay(10)
-- The actual blocking duration fluctuates.