forked from hkc/cc-stuff
Sleep and log
This commit is contained in:
parent
666a0127e1
commit
0c99ff1d5a
|
@ -21,6 +21,10 @@ if not req then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local headers = req.getResponseHeaders()
|
||||||
|
local length = headers["content-length"]
|
||||||
|
|
||||||
|
local i = 1
|
||||||
while true do
|
while true do
|
||||||
local chunk = req.read()
|
local chunk = req.read()
|
||||||
if not chunk then
|
if not chunk then
|
||||||
|
@ -28,6 +32,11 @@ while true do
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
tape.write(chunk)
|
tape.write(chunk)
|
||||||
|
i = i + 1
|
||||||
|
if (i % 16384) == 0 then
|
||||||
|
os.sleep(0.01)
|
||||||
|
print(i .. " written out of "..length)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
tape.stop()
|
tape.stop()
|
||||||
|
|
Loading…
Reference in New Issue