History

Add Test.profileRange

Ryan Huffman committed 9 years ago

Commit 9d4fdfa1 parent e181c2a2 files · +9 −0Browse files

Showing the changes to interface/src/scripting/TestScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/TestScriptingInterface.cpp+6−0
@@ -134,3 +134,9 @@ void TestScriptingInterface::startTraceEvent(QString name) { · 133 unmodified lines
134void TestScriptingInterface::endTraceEvent(QString name) {134void TestScriptingInterface::endTraceEvent(QString name) {
135 tracing::traceEvent(trace_test(), name, tracing::DurationEnd);135 tracing::traceEvent(trace_test(), name, tracing::DurationEnd);
136}136}
137
138void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn) {
139 PROFILE_RANGE(script, name);
140 fn.call();
141}
142