MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / log

Method log

common/src/debugtimer.cpp:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52bool DebugTimer::singleMode() { return m_singleMode; }
53
54void DebugTimer::log(const QString &msg, const char *function, const char *file, int line)
55{
56 if(f.isOpen()) {
57 QTextStream stream(&f);
58
59 stream << QDateTime::currentDateTime().toString("yyyy:MM:dd hh:mm:ss.zzz") << "\t" << file << ":"
60 << line << "\t" << function << "\t" << msg << "\t" << m_timer.elapsed() << "\t"
61 << "ms"
62 << "\n";
63 } else {
64 QMessageLogger(file, line, function).info(CAT_BENCHMARK)
65 << function << msg << m_timer.elapsed() << "ms";
66 }
67
68 if(m_singleMode) {
69 m_timer.restart();
70 }
71}

Callers 5

setSamplesFunction · 0.45
verifyConditionsFunction · 0.45
post_load_uiFunction · 0.45
parse_ui_callbackFunction · 0.45
generateFunction · 0.45

Calls 2

toStringMethod · 0.45
restartMethod · 0.45

Tested by

no test coverage detected