Create getTime.lua
This commit is contained in:
parent
e71b097a68
commit
716dc8bce7
1 changed files with 12 additions and 0 deletions
12
getTime.lua
Normal file
12
getTime.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
local internet = require("internet")
|
||||
|
||||
while true do
|
||||
local handle = internet.request("http://worldclockapi.com/api/json/utc/now")
|
||||
local result = ""
|
||||
for chunk in handle do
|
||||
result = result..chunk
|
||||
end
|
||||
local f = io.open("time.txt", "w")
|
||||
f:write(resul)
|
||||
f:close()
|
||||
end
|
Loading…
Reference in a new issue