summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-inf.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-15 23:17:11 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-15 23:17:11 +0200
commit30b3a925bfc1857a31e23d9b17b8da0be572d02a (patch)
tree994685218d0ab6c1c65df36dcc5a5a08a231171e /tex/context/base/mkiv/trac-inf.lua
parent01440ae8999ee20351f0538792e415ade8cd3d5c (diff)
downloadcontext-30b3a925bfc1857a31e23d9b17b8da0be572d02a.tar.gz
2016-08-15 22:45:00
Diffstat (limited to 'tex/context/base/mkiv/trac-inf.lua')
-rw-r--r--tex/context/base/mkiv/trac-inf.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/trac-inf.lua b/tex/context/base/mkiv/trac-inf.lua
index a1d7fb0a0..12a4f646f 100644
--- a/tex/context/base/mkiv/trac-inf.lua
+++ b/tex/context/base/mkiv/trac-inf.lua
@@ -61,12 +61,13 @@ local function stoptiming(instance)
timer.timing = it - 1
else
local starttime = timer.starttime
- if starttime then
- local stoptime = clock()
- local loadtime = stoptime - starttime
- timer.stoptime = stoptime
- timer.loadtime = timer.loadtime + loadtime
- timer.timing = 0
+ if starttime and starttime > 0 then
+ local stoptime = clock()
+ local loadtime = stoptime - starttime
+ timer.stoptime = stoptime
+ timer.loadtime = timer.loadtime + loadtime
+ timer.timing = 0
+ timer.starttime = 0
return loadtime
end
end
@@ -183,7 +184,7 @@ end
function statistics.runtime()
stoptiming(statistics)
- stoptiming(statistics) -- somehow we can start the timer twice, but where
+ -- stoptiming(statistics) -- somehow we can start the timer twice, but where
return statistics.formatruntime(elapsedtime(statistics))
end