summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/l-os.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/l-os.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/l-os.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/l-os.lua b/Master/texmf-dist/tex/context/base/l-os.lua
index 42f3e4862c9..05ca0acdc6a 100644
--- a/Master/texmf-dist/tex/context/base/l-os.lua
+++ b/Master/texmf-dist/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"))