diff options
author | Karl Berry <karl@freefriends.org> | 2013-07-24 21:47:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-07-24 21:47:53 +0000 |
commit | 42402bd9b4a14a3cc7c774c866fda4e419b9a4ee (patch) | |
tree | 33c0f31fffd538789552de57988c635997391606 /Master/texmf-dist/tex/luatex/lualibs/lualibs-os.lua | |
parent | 2ca350121961af1d06876475b5c661ebc41993e6 (diff) |
lualibs (24jul13)
git-svn-id: svn://tug.org/texlive/trunk@31280 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/lualibs/lualibs-os.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/lualibs/lualibs-os.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/luatex/lualibs/lualibs-os.lua b/Master/texmf-dist/tex/luatex/lualibs/lualibs-os.lua index 05ca0acdc6a..a4c0ac82085 100644 --- a/Master/texmf-dist/tex/luatex/lualibs/lualibs-os.lua +++ b/Master/texmf-dist/tex/luatex/lualibs/lualibs-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 |