Listener that starts a timer when a begin event is received and stops it when a corresponding end event is received. More...
#include <TimerListener.hpp>
Public Member Functions | |
template<Event EventType> requires MatcherFor<BeginEndMatcherType, EventType> | |
void | operator() (const EventType &event) |
bool | connected () const |
When the listener has matched the begin, but not yet the end event, it is said to be "connected". | |
bool | closed () const |
When the listener has matched both the begin and end events, it is said to be "closed". | |
void | reset () |
Reset the listener so that it can be reused to match a begin event again. | |
Public Attributes | |
BeginEndMatcherType | matcher {} |
TimerType | timer {} |
bool | matched_begin = false |
bool | matched_end = false |
Listener that starts a timer when a begin event is received and stops it when a corresponding end event is received.
The begin event is selected by requiring it to be a match for BeginEndMatcherType
while no begin event has been matched before. The end event is selected by requiring it to be a match for BeginEndMatcherType
after a begin event has been matched.
The listener can be reset by using the member function reset. After calling reset, a new begin event can be matched.
Definition at line 45 of file TimerListener.hpp.
|
inline |
When the listener has matched both the begin and end events, it is said to be "closed".
Definition at line 82 of file TimerListener.hpp.
|
inline |
When the listener has matched the begin, but not yet the end event, it is said to be "connected".
Definition at line 79 of file TimerListener.hpp.
|
inline |
Start when the event matches while no begin event has been matched before.
Stop when the event matches after a begin event has been matched.
Definition at line 48 of file TimerListener.hpp.
|
inline |
Reset the listener so that it can be reused to match a begin event again.
Definition at line 85 of file TimerListener.hpp.
bool Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, TimerType >::matched_begin = false |
Definition at line 91 of file TimerListener.hpp.
bool Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, TimerType >::matched_end = false |
Definition at line 92 of file TimerListener.hpp.
BeginEndMatcherType Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, TimerType >::matcher {} |
Definition at line 89 of file TimerListener.hpp.
TimerType Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, TimerType >::timer {} |
Definition at line 90 of file TimerListener.hpp.