Sleep: Difference between revisions

Content added Content deleted
(Add min)
Line 1,306: Line 1,306:
{{libheader|LuaSocket}}
{{libheader|LuaSocket}}
The input does not need to be a whole number, eg. "0.5" would cause the program to wait for half a second.
The input does not need to be a whole number, eg. "0.5" would cause the program to wait for half a second.
<lang lua>require("socket")
<lang lua>local socket = require("socket")
io.write("Input a number of seconds to sleep: ")
io.write("Input a number of seconds to sleep: ")
local input = io.read("*number")
local input = io.read("*number")