Posted 24 July 2013 - 09:58 AM
SpeedTest
CODE
function as()
–7.54
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.blue)
term.setBackgroundColor(colors.lime)
term.write(" Speedtest. Need30mb free space.Enable HTTP API. ")
term.setCursorPos(1,19)
term.write("COPYLEFT TABLECRAFT0R 2013 ALL WRONGS SEND TO ME. ")
term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.gray)
term.setCursorPos(1,2)
term.write("Test Size A:239kb B:1,7mb C:7.54mb D:30mb: ")
term.setCursorPos(44,2)
ax = read()
if ax=="A" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 239kb of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random350x350.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 0.239 mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
elseif ax=="B" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 1.39 MB Of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random1000x1000.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 1.39mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
elseif ax=="C" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 7.59MB Of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random2000x2000.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 7.59mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
elseif ax=="D" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 30MB Of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random4000x4000.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 30 mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
else
print("ERROR. USE CAPITAL/NO CHOICE")
end
end
as()
I
Bored. So i created this. Ignore if Boring
CODE
Spoiler
function as()
–7.54
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.blue)
term.setBackgroundColor(colors.lime)
term.write(" Speedtest. Need30mb free space.Enable HTTP API. ")
term.setCursorPos(1,19)
term.write("COPYLEFT TABLECRAFT0R 2013 ALL WRONGS SEND TO ME. ")
term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.gray)
term.setCursorPos(1,2)
term.write("Test Size A:239kb B:1,7mb C:7.54mb D:30mb: ")
term.setCursorPos(44,2)
ax = read()
if ax=="A" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 239kb of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random350x350.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 0.239 mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
elseif ax=="B" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 1.39 MB Of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random1000x1000.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 1.39mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
elseif ax=="C" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 7.59MB Of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random2000x2000.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 7.59mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
elseif ax=="D" then
term.setCursorPos(1,3)
term.write("[INFO] Downloading 30MB Of Random Data ")
–random ! ! !
apk = os.clock()
get = http.get("http://cebu.smart.com.ph/speedtest/random4000x4000.jpg")
apk2s = os.clock()
tmp = fs.open("TMP","w")
tmp.write(get.readAll())
tmp.close()
get.close()
term.setCursorPos(1,3)
term.write("[INFO] Downloaded 30 mb of data in " .. apk2s - apk .. " seconds. ")
fs.delete("TMP")
else
print("ERROR. USE CAPITAL/NO CHOICE")
end
end
as()
I
Bored. So i created this. Ignore if Boring