diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-11-26 13:31:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-11-26 13:31:00 +0100 |
commit | 82a9d3d7e785ad838f8c6d0e5d779947be0c359f (patch) | |
tree | 33ca4e34e44b085340a44436441e42798468edcc /tex/context/base/trac-inf.lua | |
parent | a57ab2d223a7bcc8e9ae57e148c30ac6e91fafdb (diff) | |
download | context-82a9d3d7e785ad838f8c6d0e5d779947be0c359f.tar.gz |
beta 2012.11.26 13:31
Diffstat (limited to 'tex/context/base/trac-inf.lua')
-rw-r--r-- | tex/context/base/trac-inf.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tex/context/base/trac-inf.lua b/tex/context/base/trac-inf.lua index 6ba3d348e..699e2b668 100644 --- a/tex/context/base/trac-inf.lua +++ b/tex/context/base/trac-inf.lua @@ -19,10 +19,16 @@ statistics = statistics or { } local statistics = statistics statistics.enable = true -statistics.threshold = 0.05 +statistics.threshold = 0.01 local statusinfo, n, registered, timers = { }, 0, { }, { } +table.setmetatableindex(timers,function(t,k) + local v = { timing = 0, loadtime = 0 } + t[k] = v + return v +end) + local function hastiming(instance) return instance and timers[instance] end @@ -33,14 +39,7 @@ end local function starttiming(instance) local timer = timers[instance or "notimer"] - if not timer then - timer = { } - timers[instance or "notimer"] = timer - end - local it = timer.timing - if not it then - it = 0 - end + local it = timer.timing or 0 if it == 0 then timer.starttime = clock() if not timer.loadtime then |