File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ function print_timers()
24
24
for _ ,timer in pairs (timers ) do
25
25
sum = sum + timer
26
26
end
27
+ if elapsed <= 0 then elapsed = 1 end
28
+ if sum <= 0 then sum = 1 end
27
29
local sorted = {}
28
30
for name ,timer in pairs (timers ) do
29
31
table.insert (sorted , {name = name , ms = timer })
@@ -35,10 +37,10 @@ function print_timers()
35
37
))
36
38
end
37
39
print ()
38
- print ((' elapsed time: %d ms (%dm %ds)' ):format (
40
+ print ((' elapsed time: %8d ms (%dm %ds)' ):format (
39
41
elapsed , elapsed // 60000 , (elapsed % 60000 ) // 1000
40
42
))
41
- print ((' total widget processing time: %d ms (%.2f%% of elapsed time)' ):format (
43
+ print ((' widget time: %8d ms (%.2f%% of elapsed time)' ):format (
42
44
sum , (sum * 100 ) / elapsed
43
45
))
44
46
end
You can’t perform that action at this time.
0 commit comments