power.sleep()function


power.sleep() suspends the computer in sleep mode.

Notes

  • On modern computers using the S0 power state, this function may fail.

Return value

This function returns true on success or false otherwise.

Example

--! luart-extensions import power print("Computer will sleep in 5sec !") sleep(5000) power.sleep()