diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-06-26 21:14:17 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-06-26 21:14:17 +0000 |
| commit | bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0 (patch) | |
| tree | e182ffe6061141df20fa2003b6671af8a4ea3c40 /etc | |
| parent | 71f6bb60bf2b7457091c7106190f92ab7e51f7c6 (diff) | |
| download | luasocket-bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0.tar.gz luasocket-bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0.tar.bz2 luasocket-bd54cd42d4c8a7d6bb9550d8aa0eac243cda63c0.zip | |
Few adjustments for windows.
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() |
