Skip to main content

Reset auto-lock idle timer (device.reset_idle)

Declaration

device.reset_idle()

Description

Reset the auto-lock idle timer (keep screen awake)
Not recommended to call too frequently. Excessive frequency (more than 10 times per second) may crash the service or the system

Example

-- Dispatch a task to reset idle every 29 seconds
thread.dispatch(function()
while 1 do
device.reset_idle()
sys.msleep(29 * 1000)
end
end)

Note: Uses functions outside this chapter thread.dispatch, sys.msleep