diff options
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/get.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/get.lua b/etc/get.lua index caaa607..a093e24 100644 --- a/etc/get.lua +++ b/etc/get.lua | |||
| @@ -63,13 +63,13 @@ end | |||
| 63 | -- kind of copied from luasocket's manual callback examples | 63 | -- kind of copied from luasocket's manual callback examples |
| 64 | function receive2disk(file, size) | 64 | function receive2disk(file, size) |
| 65 | local aux = { | 65 | local aux = { |
| 66 | start = socket._time(), | 66 | start = socket.time(), |
| 67 | got = 0, | 67 | got = 0, |
| 68 | file = io.open(file, "wb"), | 68 | file = io.open(file, "wb"), |
| 69 | size = size | 69 | size = size |
| 70 | } | 70 | } |
| 71 | local receive_cb = function(chunk, err) | 71 | local receive_cb = function(chunk, err) |
| 72 | local dt = socket._time() - aux.start -- elapsed time since start | 72 | local dt = socket.time() - aux.start -- elapsed time since start |
| 73 | if not chunk or chunk == "" then | 73 | if not chunk or chunk == "" then |
| 74 | io.write("\n") | 74 | io.write("\n") |
| 75 | aux.file:close() | 75 | aux.file:close() |
