summaryrefslogtreecommitdiff
path: root/tex/context/base/l-os.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-06-07 13:40:24 +0300
committerMarius <mariausol@gmail.com>2013-06-07 13:40:24 +0300
commita874c7d658c31400d3c6e74aff8a09f46989e1a4 (patch)
tree8d03a726ca9e5b75fa07a12fe81d074f4bc0eacc /tex/context/base/l-os.lua
parent21021e09bf1d0883c92fcf688c8ed037d92128fe (diff)
downloadcontext-a874c7d658c31400d3c6e74aff8a09f46989e1a4.tar.gz
beta 2013.06.07 12:25
Diffstat (limited to 'tex/context/base/l-os.lua')
-rw-r--r--tex/context/base/l-os.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua
index 05ca0acdc..a4c0ac820 100644
--- a/tex/context/base/l-os.lua
+++ b/tex/context/base/l-os.lua
@@ -172,19 +172,21 @@ if not os.times then -- ?
end
end
-os.gettimeofday = os.gettimeofday or os.clock
-local startuptime = os.gettimeofday()
+local gettimeofday = os.gettimeofday or os.clock
+os.gettimeofday = gettimeofday
+
+local startuptime = gettimeofday()
function os.runtime()
- return os.gettimeofday() - startuptime
+ return gettimeofday() - startuptime
end
---~ print(os.gettimeofday()-os.time())
---~ os.sleep(1.234)
---~ print (">>",os.runtime())
---~ print(os.date("%H:%M:%S",os.gettimeofday()))
---~ print(os.date("%H:%M:%S",os.time()))
+-- print(os.gettimeofday()-os.time())
+-- os.sleep(1.234)
+-- print (">>",os.runtime())
+-- print(os.date("%H:%M:%S",os.gettimeofday()))
+-- print(os.date("%H:%M:%S",os.time()))
-- no need for function anymore as we have more clever code and helpers now
-- this metatable trickery might as well disappear