For benchmarking the time cost of operations.
More...
#include <timer.h>
|
typedef std::chrono::duration< int > | Seconds |
|
typedef std::chrono::duration< int, std::milli > | Milliseconds |
|
typedef std::chrono::duration< int, std::ratio< 60 *60 > > | Hours |
|
typedef std::chrono::duration< int, std::micro > | Microseconds |
|
|
| Timer () |
| Init the internal time point to the current time.
|
|
void | Tick () |
| Reset the internal time point to the current time.
|
|
template<typename T = Milliseconds> |
int | Elapsed () const |
| Return the duration since last call to Tick() or since the creation of Timer. More...
|
|
For benchmarking the time cost of operations.
◆ Elapsed()
template<typename T = Milliseconds>
int singa::Timer::Elapsed |
( |
| ) |
const |
|
inline |
Return the duration since last call to Tick() or since the creation of Timer.
The template arg must be from Second or Millisecond or Hour. The returned value is the count of the time metric.
The documentation for this class was generated from the following file:
- /home/moaz/incubator-singa/include/singa/utils/timer.h