diff options
author | Marius <mariausol@gmail.com> | 2012-11-26 19:00:25 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-11-26 19:00:25 +0200 |
commit | 48c4609c92a6e0cbbbd8c5e894d2e11b081e032f (patch) | |
tree | 6fd604c2644afd46971a42f42ce3e1a276c19883 /tex/context/base/trac-inf.lua | |
parent | 7bd57701b696956d241d5f3fec8cc6288082cf5c (diff) | |
download | context-48c4609c92a6e0cbbbd8c5e894d2e11b081e032f.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 |