+ elseif runitem_time_map[buf.threadid] then
+ local time = buf.timestamp - runitem_time_map[buf.threadid]
+ local cputime = trace.cputime_for_thread(buf.threadid) - runitem_cputime_map[buf.threadid]
+
+ local time_ms = trace.convert_timestamp_to_nanoseconds(time) / 1000000
+ local cputime_ms = trace.convert_timestamp_to_nanoseconds(cputime) / 1000000
+
+ printf("%s\tDONE running item: time = %6.6f ms, cputime = %6.6f ms\n", prefix, time_ms, cputime_ms)
+
+ runitem_time_map[buf.threadid] = 0
+ runitem_cputime_map[buf.threadid] = 0