{ "title": "<%= @run.respond_to?(:name) ? @run.to_s : "" %>", "attempt_count": <%= @run.respond_to?(:attempts) ? @run.attempts : 0 %>, "start_delay": "<%= Time.at(@run.offset || 0).utc.strftime("%-H:%-M:%S").strip %>", "splits": [ <% @run.segments.each_with_index do |segment, index| %> { "title": "<%= segment.name %>", "time": "<%= segment.skipped?(Run::REAL) ? "0.000000" : Time.at((segment.end_ms(Run::REAL) || 0) / 1000).utc.strftime("%H:%M:%S.%6N").strip %>", "best_time": "<%= Time.at((segment.end_ms(Run::REAL) || 0).to_f / 1000).utc.strftime("%H:%M:%S.%6N").strip %>", "best_segment": "<%= Time.at((segment.shortest_duration_ms(Run::REAL) || segment.duration_ms(Run::REAL) || 0).to_f / 1000).utc.strftime("%H:%M:%S.%6N").strip %>" }<%= ',' unless @run.segments.size - 1 == index %> <% end %> ] }