![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
This class contains utility functions to log informations about time, such as logging time elapsed since a specific moment. More...
#include <common/time/traceUtils.h>
Public Member Functions | |
| TimeUtils () | |
| ~TimeUtils () | |
Static Public Member Functions | |
| static void | updateCurrentTime (const std::string &taskCategory=std::string("")) |
| store current time for new elapsed time computation | |
| static void | setCurrentTime (uint64_t time, const std::string &taskCategory=std::string("")) |
| static uint64_t | elapsedTime (const std::string &taskCategory=std::string("")) |
| static uint64_t | diffTime (const uint64_t &begin, const uint64_t &end) |
| return the difference between two times in microseconds | |
| static void | logElapsedTime (const std::string &mess, const std::string &taskCategory=std::string("")) |
| log the number of microseconds since last UpdateCurrentTime | |
| static void | logCumulatedTime (const std::string &mess, const std::string &taskCategory=std::string("")) |
| log the number of microseconds cumulated for the category sum of elapsed time between consecutive call of UpdateCurrent() and elapsedTime() | |
| static void | logAllCumulatedTime (const std::string &mess) |
| log the number of microseconds cumulated for all categories | |
| static uint64_t | getCurrentTime () |
| get the current time (real current time, not last time stored) | |
This class contains utility functions to log informations about time, such as logging time elapsed since a specific moment.
It uses the logging facility: set the TimeInfo category to INFO to view the time logs.
Definition at line 41 of file traceUtils.h.
|
inline |
Definition at line 44 of file traceUtils.h.
|
inline |
Definition at line 45 of file traceUtils.h.
|
static |
return the difference between two times in microseconds
Definition at line 51 of file traceUtils.cpp.
|
static |
Definition at line 56 of file traceUtils.cpp.
|
static |
get the current time (real current time, not last time stored)
Definition at line 32 of file traceUtils.cpp.
|
static |
log the number of microseconds cumulated for all categories
Definition at line 82 of file traceUtils.cpp.
|
static |
log the number of microseconds cumulated for the category sum of elapsed time between consecutive call of UpdateCurrent() and elapsedTime()
log the number of microseconds since last UpdateCurrentTime
Definition at line 76 of file traceUtils.cpp.
|
static |
log the number of microseconds since last UpdateCurrentTime
Definition at line 67 of file traceUtils.cpp.
|
static |
Definition at line 46 of file traceUtils.cpp.
|
static |
store current time for new elapsed time computation
Definition at line 36 of file traceUtils.cpp.