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()
2424 for _ ,timer in pairs (timers ) do
2525 sum = sum + timer
2626 end
27+ if elapsed <= 0 then elapsed = 1 end
28+ if sum <= 0 then sum = 1 end
2729 local sorted = {}
2830 for name ,timer in pairs (timers ) do
2931 table.insert (sorted , {name = name , ms = timer })
@@ -35,10 +37,10 @@ function print_timers()
3537 ))
3638 end
3739 print ()
38- print ((' elapsed time: %d ms (%dm %ds)' ):format (
40+ print ((' elapsed time: %8d ms (%dm %ds)' ):format (
3941 elapsed , elapsed // 60000 , (elapsed % 60000 ) // 1000
4042 ))
41- print ((' total widget processing time: %d ms (%.2f%% of elapsed time)' ):format (
43+ print ((' widget time: %8d ms (%.2f%% of elapsed time)' ):format (
4244 sum , (sum * 100 ) / elapsed
4345 ))
4446end
You can’t perform that action at this time.
0 commit comments