Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("working..")
- m=peripheral.wrap("top")
- sec={1,2,3,4,5,6}
- while true do
- x=1
- while x<3 do
- term.setCursorPos(1,1)
- timeHandle = http.get("http://www.timeapi.org/utc/in+one+hours")
- time = timeHandle.readLine()
- day=tonumber(time:sub(9, 10))
- month=tonumber(time:sub(6, 7))
- hour=tonumber(time:sub(12, 13))
- minute=tonumber(time:sub(15, 16))
- sec[1]=sec[2]
- sec[2]=tonumber(time:sub(18, 19))
- term.clear()
- print(day,".",month,".2015")
- print(hour,":",minute)
- print(sec[1],"|",sec[2])
- print(sec[2]-sec[1])
- m.setCursorPos(1,1)
- m.clear()
- m.write(sec[2]-sec[1])
- sleep(1)
- x=x+1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement