|
template<typename... Args> |
| counter (Args &&... args) |
| Creates a new counter and forwards the arguments to the underlying counter.
|
|
value_type | read (void) |
| Returns a reading of this counter.
|
|
value_type | value (void) const noexcept |
| Returns the cumulative difference between calls of start() and stop() since the last call to reset().
|
|
constexpr size_type | calls (void) const noexcept |
| Returns the number of times this counter has been started and stopped since the last call to reset().
|
|
constexpr bool | active (void) const noexcept |
|
void | start (void) |
| Starts this counter. More...
|
|
void | restart (void) |
| Restarts this counter. More...
|
|
value_type | stop (void) |
| Stops this counter. More...
|
|
void | reset (void) |
| Resets this counter.
|
|
template<typename T, int GroupID = 0, bool = disable_group_counter<GroupID>::value>
class stapl::counter< T, GroupID, bool >
Implements a configurable counter.
- Template Parameters
-
T | The counter type. |
GroupID | The counter group the counter belongs to. |
The counter objects have the ability to start, stop and resume collecting information. They have to be explicitly reset through the counter::reset() function to clear their internal state.