jbe/bsw@0: function trace._close_section() jbe/bsw@0: local pos = #trace._stack jbe/bsw@0: local closed_section = trace._stack[pos] jbe/bsw@0: if not closed_section then jbe/bsw@0: error("All trace sections have been closed already.") jbe/bsw@0: end bsw@115: closed_section.stop_hires_time = extos.monotonic_hires_time() bsw@82: --trace.debug("END " .. extos.monotonic_hires_time() .. " / " .. os.clock()) jbe/bsw@0: trace._stack[pos] = nil jbe/bsw@0: return closed_section jbe/bsw@0: end