mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-25 06:19:02 -06:00
Add macro for easy generation of PerformanceHelper
This commit is contained in:
@@ -44,7 +44,13 @@ private:
|
||||
|
||||
std::chrono::high_resolution_clock::time_point _startTime;
|
||||
};
|
||||
|
||||
#define __MERGE(a,b) a##b
|
||||
#define __LABEL(a) __MERGE(unique_name_, a)
|
||||
|
||||
/// Declare a new variable for measuring the performance of the current block
|
||||
#define PerformanceMeasurement(name) auto __LABEL(__LINE__) = openspace::performance::PerformanceHelper((name), OsEng.renderEngine().performanceManager())
|
||||
|
||||
} // namespace performance
|
||||
} // namespace openspace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user