MCPcopy Create free account
hub / github.com/Yaafe/Yaafe / get_timer

Method get_timer

src_cpp/yaafe-core/utils.cpp:116–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 {}
115
116 Timer* Timer::get_timer(const string& name)
117 {
118 Timer* t = NULL;
119#pragma omp critical (gettimer)
120 {
121 for (vector<Timer*>::iterator it=s_allTimers.begin();it!=s_allTimers.end();it++)
122 {
123 if ((*it)->m_name == name) {
124 t = *it;
125 break;
126 }
127 }
128 if (t == NULL) {
129 t = new Timer(name);
130 Timer::s_allTimers.push_back(t);
131 }
132 }
133 return t;
134 }
135
136 void Timer::print_all_timers()
137 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected