diff options
author | Marius <mariausol@gmail.com> | 2013-04-19 17:40:26 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-04-19 17:40:26 +0300 |
commit | b7e0ad6611d168a628cd644b4c6c7a83788e483a (patch) | |
tree | 72c8e0d8fa4899ce271636bfa6da99a3bcf058fa /tex/context/base/l-os.lua | |
parent | 4586560fc032bd763deee980ed5238511be88ba9 (diff) | |
download | context-b7e0ad6611d168a628cd644b4c6c7a83788e483a.tar.gz |
beta 2013.04.19 16:29
Diffstat (limited to 'tex/context/base/l-os.lua')
-rw-r--r-- | tex/context/base/l-os.lua | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua index 42f3e4862..05ca0acdc 100644 --- a/tex/context/base/l-os.lua +++ b/tex/context/base/l-os.lua @@ -452,8 +452,20 @@ function os.now() return date("!%Y-%m-%d %H:%M:%S") -- 2011-12-04 14:59:12 end -if not os.sleep and socket then - os.sleep = socket.sleep +-- if not os.sleep and socket then +-- os.sleep = socket.sleep +-- end + +if not os.sleep then + local socket = socket + function os.sleep(n) + if not socket then + -- so we delay ... if os.sleep is really needed then one should also + -- be sure that socket can be found + socket = require("socket") + end + socket.sleep(n) + end end -- print(os.which("inkscape.exe")) |