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