![]() |
GemaCoreLib
The GeMA Core library
|
RAII object used to measure the elapsed time of an operation. More...
#include <gmLog.h>
Public Member Functions | |
GmTimeMsg (const GmLogCategory &logger, QString msg) | |
Private Attributes | |
QElapsedTimer | _timer |
Timer used to measure elapsed time. | |
const GmLogCategory & | _logger |
The logger used to emmit messages. | |
QString | _msg |
Message title. | |
Static Private Attributes | |
static bool | _collectTimeStatistics = false |
A global flag controlling whether we should collect per message statistics. Controled by GmSetCollectTimeStatistics() More... | |
static int | _nestLevel = 0 |
A global value storing the current nesting level (GmTimeMsg objects created in the scope of another one) More... | |
Friends | |
GMC_API_EXPORT bool | GmSetCollectTimeStatistics (bool) |
Enables or disables the collection of time statistics from messages emmitted with GmTimeMsg. | |
GMC_API_EXPORT void | GmLogTimeStatistics (const GmLogCategory &) |
Logs the current contents of the time statistics map using the given logger. Expects to be called from the main thread only. | |
RAII object used to measure the elapsed time of an operation.
When the object is constructed, a timer is started. On destruction, the elapsed time is measured and a message is printed with gmTimeMsg().
|
staticprivate |
A global flag controlling whether we should collect per message statistics. Controled by GmSetCollectTimeStatistics()
The global flag controlling time statistics collection.
|
staticprivate |