MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / formatRow

Method formatRow

src/workflow/Timer.cpp:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58std::string Timer::formatRow(size_t message_len, size_t timepoint_len, size_t duration_len) const {
59 if (m_level == 1) {
60 return fmt::format(fmt::fg(fmt::color::light_gray), "| o {3:<{0}.{0}s} | {4:%T} | {5:%T} | {6:^{2}} |\n", message_len - 2, timepoint_len,
61 duration_len, m_message, m_start, m_end, duration());
62 } else if (m_level == 2) {
63 return fmt::format(fmt::fg(fmt::color::light_gray), "| o {3:<{0}.{0}s} | {4:%T} | {5:%T} | {6:^{2}} |\n", message_len - 4, timepoint_len,
64 duration_len, m_message, m_start, m_end, duration());
65 } else {
66 return fmt::format("| {3:<{0}.{0}s} | {4:%T} | {5:%T} | {6:^{2}} |\n", message_len, timepoint_len, duration_len, m_message, m_start, m_end,
67 duration());
68 }
69}
70
71Timer& TimerCollection::newTimer(std::string message, unsigned level) {
72 m_timerIndices.push_back(m_timers.size());

Callers 1

timeReportMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected